1
0
mirror of https://github.com/dhil/phd-dissertation synced 2026-03-13 02:58:26 +00:00

Update code

This commit is contained in:
2021-05-22 20:33:28 +01:00
parent 85757c48fd
commit a41fb391fc
4 changed files with 719 additions and 160 deletions

View File

@@ -680,3 +680,18 @@ fun tcphandshakeFail() {
performTCP(tcpserver, 84, sfd, cfd)
}
}
#
# Grep
#
#sig grep : (String) {Await:Char,Yield:(Char) -> () |_}~> ()
fun grep(str) {
var cs = explode(str);
fun match(c,cs) {
switch (cs) {
case c' :: cs' ->
if (c == '\n') fail()
if (c == c')
}
}
}