begin building a scheme template

This commit is contained in:
David 2023-12-01 21:27:28 -05:00
parent 8817481f23
commit 94a11e24c5
3 changed files with 22 additions and 0 deletions

16
main.scm.tmpl Normal file
View File

@ -0,0 +1,16 @@
(import
(chicken io)
(chicken format)
)
(call-with-input-file "inputs/input"
(lambda (port)
(map
(lambda (line) (printf "~A~%" line))
(read-lines port))))
(call-with-input-file "inputs/input"
(lambda (port)
(map
(lambda (line) (printf "~A~%" line))
(read-lines port))))

3
new.sh
View File

@ -14,5 +14,8 @@ if [ "${1}" != "" ]; then
if [ ! -f "${padded}/main.go" ]; then if [ ! -f "${padded}/main.go" ]; then
cp -n main.go.tmpl ${padded}/main.go cp -n main.go.tmpl ${padded}/main.go
fi fi
if [ ! -f "${padded}/main.scm" ]; then
cp -n main.scm.tmpl ${padded}/main.scm
fi
echo "https://adventofcode.com/${__year}/day/${1}" echo "https://adventofcode.com/${__year}/day/${1}"
fi fi

3
run.sh
View File

@ -6,5 +6,8 @@ if [ "${1}" != "" ]; then
if [ "${2}" == "go" ]; then if [ "${2}" == "go" ]; then
go run main.go go run main.go
fi fi
if [ "${2}" == "csi" ]; then
csi -s main.scm
fi
cd - > /dev/null cd - > /dev/null
fi fi