Skip to content

Commit 151f3b7

Browse files
author
Your Name
committed
Add example
1 parent 7c64eea commit 151f3b7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

examples/45-enum.hell

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)