From: "Shakthi Kannan" <shakthimaan@gmail.com>
To: guile-user@gnu.org
Subject: make-hash-table: Wrong type argument
Date: Wed, 9 Jul 2008 14:04:02 +0530 [thread overview]
Message-ID: <d16b1c80807090134i70e23fd5x2f64abe05dbdf864@mail.gmail.com> (raw)
Hi,
Newbie here. I am trying to pass key/value to a procedure to add it to
the hash-table. It fails at:
"you"ERROR: In procedure hash_fn_create_handle_x:
ERROR: Wrong type argument in position 1: "foo"
=== BEGIN ===
#!/usr/local/bin/guile -s
-e main -s
!#
(use-modules (ice-9 rdelim))
(define make-dictionary
(lambda (name size)
(lambda ()
(define name (make-hash-table size)))))
(define add-to-dictionary
(lambda (table key value)
(write value)
(hash-set! table key value)))
(define (main args)
(make-dictionary "foo" 4)
(add-to-dictionary "foo" 'u "you")
)
=== END ===
What am I missing? Is this abstraction ok?
Thanks!
SK
--
Shakthi Kannan
http://www.shakthimaan.com
next reply other threads:[~2008-07-09 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 8:34 Shakthi Kannan [this message]
2008-07-10 7:35 ` make-hash-table: Wrong type argument Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d16b1c80807090134i70e23fd5x2f64abe05dbdf864@mail.gmail.com \
--to=shakthimaan@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).