-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.zp
27 lines (26 loc) · 1.13 KB
/
test.zp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(load "argparse.zp")
(define x ((import "argparse:handle-args")
"this program kills zombies"
(list (make-hash ["name" "foo"]
["type" :number]
["default" 10]
["usage" "foo you"])
(make-hash ["name" "bar"]
["type" :string]
["required" #f]
["usage" "bar me"])
(make-hash ["name" "someotherthing"]
["short" "s"]
["type" :string]
["options" ("this" "that")]
["usage" "some bollocks"])
(make-hash ["name" "bool"]
["short" "b"]
["type" :boolean]
["usage" "some boolean"]))))
(if (hash-map? x)
(begin
(write `("foo is: " ,(x "foo")))
(write `("bar is: " ,(x "bar")))
(write `("someotherthing is: " ,(x "someotherthing")))
(write `("bool is: " ,(x "bool")))))