Add list sugar
Some checks are pending
Publish Playground / build (push) Waiting to run
Publish Playground / deploy (push) Blocked by required conditions

This commit is contained in:
2026-03-29 19:30:37 -07:00
parent 2f1185bf4c
commit 4814682712
5 changed files with 53 additions and 0 deletions

19
tests/ListSugar.newt Normal file
View File

@@ -0,0 +1,19 @@
module ListSugar
import Prelude
blah : List Int
blah = [ 1, 2, 3]
bar : List Int Int
bar [ ] = 0
bar [x] = 1
bar _ = 42
main : IO Unit
main = do
printLn blah
printLn $ bar []
printLn $ bar [ 42 ]
printLn $ bar blah