lean4-htt/old_tests/tests/lean/run/list_notation.lean
2018-04-10 12:56:55 -07:00

27 lines
383 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

open nat
#eval [1, 2, 3]
#eval to_bool $ 1 ∈ [1, 2, 3]
#eval to_bool $ 4 ∈ [1, 2, 3]
#eval [1, 2, 3] ++ [3, 4]
#eval 2 :: [3, 4]
#eval ([] : list nat)
#eval (∅ : list nat)
#eval ({1, 3, 2, 2, 3, 1} : list nat)
#eval [1, 2, 3] [3, 4, 1, 5]
#eval [1, 2, 3] ∩ [3, 4, 1, 5]
#eval (*10) <$> [1, 2, 3]
#check ({1, 2, 3} : list nat)
#check ({1, 2, 3, 4} : set nat)