chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] array->list does not return a list for a rank-1 arra


From: Kon Lovett
Subject: Re: [Chicken-users] array->list does not return a list for a rank-1 array
Date: Mon, 17 Sep 2007 09:41:05 -0700


On Sep 14, 2007, at 1:32 PM, Terrence Brannon wrote:

Re: http://www.call-with-current-continuation.org/eggs/array-lib.html
Quote: procedure: (array->list ARRAY)

Returns the array elements as a rank-nested list. For rank 0 arrays returns
just the element.

== This implies

a list should be returned for rank-1 arrays

== However

For a rank-1 list consisting of 1 element, it does not return a list:

(require-extension array-lib)


(define (rank-1 . elems)
  (apply array (list (length elems)) elems))



#;90> (array-rank (rank-1 4 5))
1
#;91> (array-rank (rank-1 4))
1
#;93> (list? (array->list (rank-1 4 5)))
#t
#;94> (list? (array->list (rank-1 4 )))
#f

Fixed in release 2.110, coming soon.



_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

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