Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test() -> List[int]:
return List(['1', '2', '3']).and_then(lambda x: List([x**2]))
def test() -> List[str]:
return List(i for i in (1, 2, 3)).and_then(lambda x: List([x**2]))
def test() -> List[int]:
return List([1])
assert l.and_then(lambda v: List([v])) == l
def test_inequality(self, first, second):
assume(first != second)
assert List(first) != List(second)
def test_left_identity_law(self, v, f):
assert List([v]).and_then(f) == f(v)
def test_empty(self):
assert List().empty() == List()
return List(i for i in (1, 2, 3)).and_then(lambda x: List([x**2]))