+ 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.
18 lines
290 B
Plaintext
18 lines
290 B
Plaintext
!import "base.tri" !Local
|
|
!import "list.tri" !Local
|
|
|
|
bytesNil? = emptyList?
|
|
|
|
bytesHead =
|
|
matchList nothing (h _ : just h)
|
|
|
|
bytesTail =
|
|
matchList nothing (_ r : just r)
|
|
|
|
bytesLength = length
|
|
bytesAppend = append
|
|
bytesTake = take
|
|
bytesDrop = drop
|
|
bytesSplitAt = splitAt
|
|
bytesEq? = equal?
|