Function from symbol?
Posted: Wed Feb 21, 2007 8:02 pm
How can I:
In other words, reference a dynamic function inside a quoted list. The real reason for this is a process I created for parsing fixed width files:
Now, the import-data function recognizes that dob requires a special conversion by the inclusion of another parameter in the fixed width format specification. I want import-data to then call the function "special-conversion-function" but I am failing to make it work.
Thanks,
Jeremy
Code: Select all
(define (greet who) (print "Hello " who))
(set 'lst '((name "John" who) (age 10)))
((lst 0 2) (lst 0 1))
Code: Select all
(define (special-conversion-function str) (do-something str))
(set 'layout '((name 10) (dob 6 special-conversion-function) (country 2)))
(import-data "file.txt" layout)
Thanks,
Jeremy