[ create a new paste ] login | about

Link: http://codepad.org/RVLcudBP    [ raw code | fork ]

Plain Text, pasted on Feb 24:
$ guile
GNU Guile 2.2.6
Copyright (C) 1995-2019 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (srfi srfi-9))
scheme@(guile-user)> (define-record-type <address>
       (address street city country)
       address?
       (street  address-street)
       (city    address-city)
       (country address-country))
scheme@(guile-user)> (define-immutable-record-type <person>
       (person age email address)
       person?
       (age     person-age set-person-age)
       (email   person-email set-person-email)
       (address person-address set-person-address))
While compiling expression:
Syntax error:
unknown file:13:7: address: Wrong number of arguments in form (address person-address set-person-address)
scheme@(guile-user)> (define fsf-address
       (address "Franklin Street" "Boston" "USA"))
scheme@(guile-user)> (set-fields fsf-address ((address-city) "Detroit"))
While compiling expression:
Syntax error:
unknown file:16:24: address-city: Wrong number of arguments in form (address-city)
scheme@(guile-user)>


Create a new paste based on this one


Comments: