Mercurial > repos > icfp2013
annotate 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 |
rev | line source |
---|---|
10
79c1db5e7ebd
sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff
changeset
|
1 #{ |
14 | 2 evalRequest <- :args { |
12
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
3 #{ |
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
4 id <- "a" |
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
5 arguments <- args |
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
6 string <- { |
15
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
7 temp <- ""//arguments fold: "" with: :acc el {acc . el} |
14 | 8 "id" . id . "arguments" . temp |
12
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
9 } |
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
10 } |
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
11 } |
10
79c1db5e7ebd
sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff
changeset
|
12 |
15
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
13 guessRequest <- :id :prog { |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
14 #{ |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
15 string <- { |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
16 //remove the second escaped quote, it will compile. |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
17 idStr <- "\"id\"" //;\"" . id . "\"" |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
18 progStr <- "b" // "\"program\":\"" . prog . "\"" |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
19 idStr . progStr |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
20 } |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
21 } |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
22 } |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
23 |
12
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
24 main <- { |
15
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
25 //print: ((evalRequest: #[1 2 3]) string) |
18ec9131f594
one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents:
14
diff
changeset
|
26 print: ((guessRequest: "someId" "someProg") string) . "\n" |
12
7d8b8f82cbef
Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents:
10
diff
changeset
|
27 } |
10
79c1db5e7ebd
sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff
changeset
|
28 } |