Ergonomic language features and lib cleanup
+ let bindings + where bindings + do notation I explored enough of the alternative language design space and decided that we should commit fully to Lambda style. That means no more highly tacit/concatenative point-free/partial programs as default. We'll keep taking advantage of those capabilities when it makes sense, but the library will continue to see massive overhauls.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
!import "base.tri" !Local
|
||||
!import "list.tri" !Local
|
||||
!import "lazy.tri" !Local
|
||||
|
||||
match_ = y (self value patterns :
|
||||
triage
|
||||
@@ -22,3 +23,20 @@ match = (value patterns :
|
||||
patterns))
|
||||
|
||||
otherwise = const (t t)
|
||||
|
||||
cond_ self patterns =
|
||||
lazyList
|
||||
(_ : t)
|
||||
(pattern rest :
|
||||
matchPair
|
||||
(testK actionK :
|
||||
lazyBool
|
||||
actionK
|
||||
(_ : self rest)
|
||||
(testK t))
|
||||
pattern)
|
||||
patterns
|
||||
|
||||
cond patterns = y cond_ patterns
|
||||
|
||||
guard testK actionK = pair testK actionK
|
||||
|
||||
Reference in New Issue
Block a user