From 519c3beb5fb7a41ce5b70be10435471ad9961ff8 Mon Sep 17 00:00:00 2001 From: dhilipsiva Date: Thu, 1 May 2014 11:45:06 +0530 Subject: [PATCH] Add Scheme snippets --- snippets/scheme.snippets | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 snippets/scheme.snippets diff --git a/snippets/scheme.snippets b/snippets/scheme.snippets new file mode 100644 index 0000000..035d534 --- /dev/null +++ b/snippets/scheme.snippets @@ -0,0 +1,36 @@ +snippet + + (+ ${1} + ${0}) + +snippet - + (- ${1} + ${0}) + +snippet / + (/ ${1} + ${0}) + +snippet * + (* ${1} + ${0}) + +# Definition +snippet def + (define (${1:name}) + (${0:definition})) + +# Definition with lambda +snippet defl + (define ${1:name} + (lambda (x)(${0:definition}))) + +# Condition +snippet cond + (cond ((${1:predicate}) (${2:action})) + ((${3:predicate}) (${0:action}))) + +# If statement +snippet if + (if (${1:predicate}) + (${2:true-action}) + (${0:false-action}))