Hi folks (and a great new year!), I have a small but trivial problem I can not get around.
When loading (define lcd '((#(0 0 0) ("Wooden Whale" "Beorold" "Korgal") "Leif") (#(1 0 0)) (#(2 0 0) "Jerome" "Azog" ("Diamond Princess")) (#(3 0 0)))) into a hash-table via ;; using hash tables (use srfi-69) (define unitlocs (make-hash-table)) ;; load the stuff with a func (define (fill-unitlocs alist) (cond ((= (length alist) 0) (print "Loading finished: " (length alist) ) ) (else ( (hash-table-set! unitlocs (car (car alist)) (cdr (car alist))) (fill-unitlocs (cdr alist)))))) I get the following error: Error: call of non-procedure: #<unspecified> Call history: <eval> [fill-unitlocs] (fill-unitlocs (cdr alist)) <eval> [fill-unitlocs] (cdr alist) <eval> [fill-unitlocs] (= (length alist) 0) <eval> [fill-unitlocs] (length alist) <eval> [fill-unitlocs] ((hash-table-set! unitlocs (car (car alist)) (cdr (car alist))) (fill-unitlocs (cdr alist))) <eval> [fill-unitlocs] (hash-table-set! unitlocs (car (car alist)) (cdr (car alist))) <eval> [fill-unitlocs] (car (car alist)) <eval> [fill-unitlocs] (car alist) <eval> [fill-unitlocs] (cdr (car alist)) <eval> [fill-unitlocs] (car alist) <eval> [fill-unitlocs] (fill-unitlocs (cdr alist)) <eval> [fill-unitlocs] (cdr alist) <eval> [fill-unitlocs] (= (length alist) 0) <eval> [fill-unitlocs] (length alist) <eval> [fill-unitlocs] (print "Loading finished: " (length alist)) <eval> [fill-unitlocs] (length alist) <-- Loading finished: 0 Now, after getting a bit smarter with google/chicken wiki it seems that there is a paranthesis call too much in the whole thing. But I can't find. Note that I know that (define unitlocs (alist->hash-table lcd)) would solve the hassle - but I would like to know what I did wrong.. &$*#$(/ Cheers, mfv _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users