(: Aiche Tee Tee Pee :)
Perhaps the first webserver in Tree Calculus? Sure, it's married to a Haskell IO runtime... but we're managing all of the actual webserver semantics in tricu! This includes a demo Arboricx application server that is capable of storing and serving bundles.
This commit is contained in:
25
lib/list.tri
25
lib/list.tri
@@ -162,19 +162,22 @@ strAppend = append
|
||||
strEq? = equal?
|
||||
strEmpty? = emptyList?
|
||||
|
||||
startsWith? = y (self prefix str :
|
||||
matchList
|
||||
true
|
||||
(ph pr :
|
||||
startsWith? = (prefix input :
|
||||
((go :
|
||||
go prefix input)
|
||||
(y (self p s :
|
||||
matchList
|
||||
false
|
||||
(sh sr :
|
||||
matchBool
|
||||
(self pr sr)
|
||||
true
|
||||
(ph pr :
|
||||
matchList
|
||||
false
|
||||
(equal? ph sh))
|
||||
str)
|
||||
prefix)
|
||||
(sh sr :
|
||||
matchBool
|
||||
(self pr sr)
|
||||
false
|
||||
(equal? ph sh))
|
||||
s)
|
||||
p))))
|
||||
|
||||
endsWith? = prefix str : startsWith? (reverse prefix) (reverse str)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user