view 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
line wrap: on
line source

#{
	evalRequest <- :args {
		#{
			id <- "a"
			arguments <- args
			string <- {
				temp <- ""//arguments fold: "" with: :acc el {acc . el}
				"id" . id . "arguments" . temp
			}
		}
	}

	guessRequest <- :id :prog {
		#{
			string <- {
				//remove the second escaped quote, it will compile.
				idStr <- "\"id\"" //;\"" . id . "\""
				progStr <- "b" // "\"program\":\"" . prog . "\""
				idStr . progStr
			}
		}
	}

	main <- {
		//print: ((evalRequest: #[1 2 3]) string)
		print: ((guessRequest: "someId" "someProg") string) . "\n"
	}
}