On Sat, 19 Mar 2011 10:10:15 -0400
Matthias Felleisen
wrote:
>
> Read delivers an S-expression. You need to turn it into a structure
> again
>
Aaah, ok. I see.
--
Thanks,
Manfred
_
For list-related administrative tasks:
http://lists.r
Read delivers an S-expression. You need to turn it into a structure again
On Mar 19, 2011, at 5:29 AM, Manfred Lotz wrote:
> On Wed, 8 Dec 2010 16:13:08 -0500
> Matthias Felleisen
> wrote:
>
>
>> ;;
>> -
>> ;;
>> us
On Wed, 8 Dec 2010 16:13:08 -0500
Matthias Felleisen
wrote:
> ;;
> -
> ;;
> usage example (could be separate module) (define detail-default "?")
> (struct/kw book (author title [details detail-default]) #:transparent)
>
On Wed, 8 Dec 2010 16:13:08 -0500
Matthias Felleisen
wrote:
>
>
>
> Here is a version with 'type' annotations that should be easier to
> read and learn from.
>
> #lang racket
>
> ;;
> -
> ;;
> library module
>
>
Here is a version with 'type' annotations that should be easier to read and
learn from.
#lang racket
;; -
;; library module
;; syntax def
;; definition = ... | (struct/kw name (field ...) options ...)
;; meaning:
On Wed, 8 Dec 2010 14:39:52 -0500
Matthias Felleisen
wrote:
>
>
>
> #lang racket
>
> ;;
> -
> ;;
> library module
>
> ;; syntax def
> ;; definition = ... | (struct/kw name (field ...) options ...)
> ;; meaning:
#lang racket
;; -
;; library module
;; syntax def
;; definition = ... | (struct/kw name (field ...) options ...)
;; meaning: (struct name (field ...) options ...)
;; plus keyword-based c
On Wed, 8 Dec 2010 10:25:47 -0500
Matthias Felleisen
wrote:
>
> #lang racket
>
> ;;
> -
> ;;
> library module
>
> ;; syntax def
> ;; definition = ... | (struct/kw name (field ...) options ...)
> ;; meaning:
#lang racket
;; -
;; library module
;; syntax def
;; definition = ... | (struct/kw name (field ...) options ...)
;; meaning: (struct name (field ...) options ...)
;; plus keyword-based con
Manfred Lotz writes:
> In Common Lisp I can define something like this:
> (defvar *db* nil)
> (defun make-book (&key author title)
> (list :author author :title title))
> (defun add-record (book) (push book *db*))
> (add-record (make-book :author "John Grisham" :title "The Client"))
> I like to
On Wed, 08 Dec 2010 00:20:13 -0500
Neil Van Dyke wrote:
> Manfred Lotz wrote at 12/07/2010 11:51 PM:
> [...]
> > (add-record (make-book :author "John Grisham" :title "The Client"))
> >
> > I like to use field names like in the example above. Can I do this
> > in racket?
>
> What I have done mo
Manfred Lotz wrote at 12/07/2010 11:51 PM:
[...]
(add-record (make-book :author "John Grisham" :title "The Client"))
I like to use field names like in the example above. Can I do this in racket?
What I have done most recently is to define a struct with a low-level
constructor with positional
12 matches
Mail list logo