Mercurial > repos > icfp2013
comparison src/requests.tp @ 16:cb5108f62f93
moving file
author | William Morgan <bill@mrgn.org> |
---|---|
date | Fri, 09 Aug 2013 04:17:27 -0700 |
parents | src/requsets.tp@18ec9131f594 |
children | 566960135ea1 |
comparison
equal
deleted
inserted
replaced
15:18ec9131f594 | 16:cb5108f62f93 |
---|---|
1 #{ | |
2 evalRequest <- :args { | |
3 #{ | |
4 id <- "a" | |
5 arguments <- args | |
6 string <- { | |
7 temp <- ""//arguments fold: "" with: :acc el {acc . el} | |
8 "id" . id . "arguments" . temp | |
9 } | |
10 } | |
11 } | |
12 | |
13 guessRequest <- :id :prog { | |
14 #{ | |
15 string <- { | |
16 //remove the second escaped quote, it will compile. | |
17 idStr <- "\"id\"" //;\"" . id . "\"" | |
18 progStr <- "b" // "\"program\":\"" . prog . "\"" | |
19 idStr . progStr | |
20 } | |
21 } | |
22 } | |
23 | |
24 main <- { | |
25 //print: ((evalRequest: #[1 2 3]) string) | |
26 print: ((guessRequest: "someId" "someProg") string) . "\n" | |
27 } | |
28 } |