1 parent 7c64eea commit 151f3b7Copy full SHA for 151f3b7
1 file changed
examples/45-enum.hell
@@ -0,0 +1,12 @@
1
+main = do
2
+ IO.print $ List.take 5 $ Enum.enumFrom 1
3
+ IO.print $ Enum.enumFromTo 1 10
4
+ IO.print $ List.take 5 $ Enum.enumFrom 'a'
5
+ IO.print $ List.take 5 $ Enum.enumFrom Bool.False
6
+ IO.print $ List.take 5 $ Enum.enumFrom (Int.toInteger 1)
7
+ IO.print $ List.take 5 $ Enum.enumFrom $
8
+ Maybe.maybe (Error.error "Bad day.") Function.id $ Day.fromGregorianValid (Int.toInteger 2020) 01 01
9
+
10
+ -- simple list generators
11
+ IO.print [1 .. 3]
12
+ IO.print $ List.take 5 ['a' ..]
0 commit comments