() Marek Kubica
() Thu, 2 Dec 2010 05:45:56 +0100
Before I reinvent the wheel, does Guile have support for
something similar to Racket's curry/curryr or Pythons
functools.partial, which returns me a lambda with some
arguments already pre-set?
If you mean:
(define ((foo x) y)
(
On 2 Dec 2010, at 10:57, Marco Maggi wrote:
I am writing on a parser that translates normal function
syntax in to Guile code.
I do not know which scenario you are working with, ...
I have a Bison/Flex parser/lexer combination that writes Guile code
directly by calling Guile C-functions,
Hi,
Marek Kubica writes:
> Before I reinvent the wheel, does Guile have support for something
> similar to Racket's curry/curryr or Pythons functools.partial, which
> returns me a lambda with some arguments already pre-set?
There’s SRFI-26 (info "(guile) SRFI-26").
Thanks,
Ludo’.
"Marco Maggi" wrote:
>"Hans Aberg" wrote:
>> I am writing on a parser that translates normal function
>> syntax in to Guile code.
>
> I do not know which scenario you are working with, but it
> is perfectly possible to convert the input syntax:
>
> ((sin , cos , tan) 1.2)
Sorry, I have been too
"Hans Aberg" wrote:
> I am writing on a parser that translates normal function
> syntax in to Guile code.
I do not know which scenario you are working with, but it is
perfectly possible to convert the input syntax:
((sin , cos , tan) 1.2)
to the output:
((lambda args
(map (lambda (f)
Another problem: passing a list of length two to a function that takes
two non-arguments. For example,
(define h (lambda (x y) (display x) (display y)))
and passing (list 1 2) to it.
It is in the same context as before: I want to build functions like in
Haskell
f((1, 2), 3) where f = \((
On 2 December 2010 07:06, Nala Ginrut wrote:
> Hi, everybody!
> I got a question while I'm trying GOOPS, here is some example code pieces:
> ;;guile code
> (define-class ()
> (cache #:init-form 0)
> (tt #:init-form 1
> #:allocation #:virtual
> #:slot-set! (lambda (o v)
>
thanks, but my question is something like this:
...
(cache ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; ERROR
...
(sunday ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; That's OK
I could call "(slot-ref o 'cache)" in other slot except "cache", but what
should I do if I need to
On 3 December 2010 00:52, Nala Ginrut wrote:
> thanks, but my question is something like this:
> ...
> (cache ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; ERROR
> ...
> (sunday ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; That's OK
>
> I could call "(slot-ref o 'cache)" in o
yeah~you hit it precisely!
But I'm not sure if I modified the slot-seting call ,the result is all
slot-set! procedure would be effected? That's terrible.
If there isn't any existed solution, I'd better look into the code and do
some hacking.
Thank you very much!
l...@gnu.org (Ludovic Courtès) writes:
> Peter TB Brett writes:
>
>> Thanks for the info. Judging by previous experience, gEDA will need to
>> support Guile 1.8.x for at least two years after Guile 2.x arrives.
>> It's probably going to be painful. :-/
>
> Out of curiosity, did you try building/
11 matches
Mail list logo