(Arne Babenhauserheide)
2013-04-21: added a helper function for nth. Problem with wisp: tail calls are added a helper function for nth. Problem with wisp: tail calls are *very* convenient, so I really want to use them.
diff --git a/wisp.w b/wisp.w
--- a/wisp.w
+++ b/wisp.w
@@ -1,4 +1,4 @@
-#!/usr/bin/env guilewisp
+#!/usr/bin/env guile
; !#
; Test
@@ -6,14 +6,14 @@
display "Hello World!"
newline
+define : nth idx form
+ list-ref form idx
+
let
:
origfile
- open-file
- list-ref
- command-line
- . 1
- . "r"
+ open-file : nth 1 : command-line
+ . "r" ; mode
let : : nextchar : read-char origfile
while : not : eof-object? nextchar