Idiomatic naming in libs

This commit is contained in:
2026-05-07 08:15:32 -05:00
parent 44ab13c889
commit 37d57044e2
3 changed files with 16 additions and 16 deletions

View File

@@ -4,13 +4,13 @@
nothing = t
just = x : t x
bytesIsNil = emptyList?
bytesNil? = emptyList?
bytesHead = matchList nothing (h _ : just h)
bytesTail = matchList nothing (_ r : just r)
byteEq = equal?
byteEq? = equal?
bytesLength = length
bytesAppend = append
@@ -38,12 +38,12 @@ bytesDrop = n bytes : bytesDrop_ n 0 bytes
bytesSplitAt = n bytes : pair (bytesTake n bytes) (bytesDrop n bytes)
bytesEq = y (self xs ys :
bytesEq? = y (self xs ys :
matchList
(matchList true (_ _ : false) ys)
(xh xt :
matchList
false
(yh yt : and? (byteEq xh yh) (self xt yt))
(yh yt : and? (byteEq? xh yh) (self xt yt))
ys)
xs)