lean4-htt/tests/lean/run/list_notation.lean
2017-03-09 18:41:19 -08:00

27 lines
386 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 (mul 10) <$> [1, 2, 3]
#check ({1, 2, 3} : list nat)
#check ({1, 2, 3, 4} : set nat)