[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Utkarsh Singh] Undefined simultaneous definitions

From: Utkarsh Singh
Subject: Re: [Utkarsh Singh] Undefined simultaneous definitions
Date: Mon, 20 Sep 2021 18:48:44 +0530

On 2021-09-20, 14:07 +0200, Stefan Israelsson Tampe <> 

Note: Now I am using Guile straight out of main branch.

> I tested your code on my machine, it works! What version of guile are you
> using?

Again I think there is a confusion.  The program I have written compiles
correctly BUT the output of the program in not desirable.  Here is a

1. Load "ambeval.scm"
2. Type (driver-loop) into your REPL session.
3. Copy and Paste following snippet:

   (define (findout32 x)
    (letrec ((even?
              (lambda (n)
                (if (= n 0)
                    (odd? (- n 1)))))
              (lambda (n)
                (if (= n 0)
                    (even? (- n 1))))))
       ((even? x) 20)
       ((odd? x) 30)
       (else 40))))

4. Type (findout32 10)


;;; Starting a new problem ERROR: In procedure scm-error:
Unassigned variable -- LOOKUP-VARIABLE-VALUE odd?

Expected Output:


All the best,
Utkarsh Singh

Utkarsh Singh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]