bugGuile - Bugs: bug #25519, Double currying does not work

 
 

bug #25519: Double currying does not work

Submitter:  None
Submitted:  Sun 08 Feb 2009 11:30:56 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 08 Apr 2010 09:59:35 PM UTC, comment #4: 
Ludovic Courtès <civodul>
Group administrator
Mon 09 Feb 2009 08:17:01 PM UTC, comment #3: 

Hmm, you're right.  The only mention of this behavior in the manual is in the "define* Reference" node, so I guess the manual will need to be improved as well.

(Reopening the bug.)

Ludovic Courtès <civodul>
Group administrator
Mon 09 Feb 2009 07:55:54 PM UTC, comment #2: 

I'm not sure that's right.  Currying is a well known and unambiguous extension to the R5RS syntax, and I believe that Guile has supported it for ages.  There are lots of mentions in the manual, and we have tests for it in test-suite/tests/syntax.test.

So I think something more specific has gone wrong here.

Neil Jerram <ossau>
Group administrator
Mon 09 Feb 2009 04:44:45 PM UTC, comment #1: 

No, it shouldn't work, according to R5RS Section 7.1.6 "Programs and definitions", where the formal syntax of a definition is specified as:

<definition> -> (define <variable> <expression>)
      | (define (<variable> <def formals>) <body>)
      | (begin <definition>*)

Thanks,
Ludo'.

Ludovic Courtès <civodul>
Group administrator
Sun 08 Feb 2009 11:30:56 PM UTC, original submission:  

The following does not work, but should:

    (define ((f x) y) (+ x y))
    ((f 2) 3)

(the definition gives an invalid syntax error).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ossau (Posted a comment)
  • -email is unavailable- added by civodul (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-08 civodul StatusNone Fixed
        Open/ClosedOpen Closed
    2009-02-09 civodul Open/ClosedClosed Open
    2009-02-09 civodul Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code