[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-mit-scheme] [bug #19535] Reduction of Lists: 'reduce' reverses argu
From: |
anonymous |
Subject: |
[Bug-mit-scheme] [bug #19535] Reduction of Lists: 'reduce' reverses arguments |
Date: |
Fri, 06 Apr 2007 04:18:34 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 |
URL:
<http://savannah.gnu.org/bugs/?19535>
Summary: Reduction of Lists: 'reduce' reverses arguments
Project: MIT/GNU Scheme
Submitted by: None
Submitted on: Friday 04/06/2007 at 04:18 UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect behavior
Status: None
Privacy: Public
Assigned to: None
Originator Name: Anton Davis
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Keywords:
_______________________________________________________
Details:
The functions 'reduce-right', 'fold-left' and 'fold-right' work as described
in the documentation, but 'reduce' produces incorrect results.
(reduce list '() '(1 2 3 4)) => (4 (3 (2 1))
(reduce - 0 '(1 2 3 4)) => 2
whereas
(list (list (list 1 2) 3) 4) => (((1 2) 3) 4)
(- (- (- 1 2) 3) 4) => -8
It seems that 'reduce' reverses the order of its arguments in release
7.7.90.+.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?19535>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-mit-scheme] [bug #19535] Reduction of Lists: 'reduce' reverses arguments,
anonymous <=