mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 02:58:26 +00:00
Update code
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user