From: SourceForge.net <noreply@so...>  20091129 21:44:34

Bugs item #1551310, was opened at 20060903 05:33 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1551310&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: mod and floor should distribute over matrix and list Initial Comment: >From the mailing list: On 9/2/06, Stavros Macrakis <macrakis@...> wrote: > On 9/1/06, Barton Willis <willisb@...> wrote: > > To apply mod to each element of a matrix, you'll still need to use > > matrixmap and a lambda form. Doing mod(matrix([...]),10) makes a mess... > > Well, that's a bug we should fix... both mod and floor should > distribute over matrix and list. The current result is silly. Couple of random addenda: (1) Are there other functions to consider here? e.g. ceiling  maybe others? (2) Should mod, floor, ceiling, etc also distribute over sets?  >Comment By: Dieter Kaiser (crategus) Date: 20091129 22:44 Message: With revision 1.93 of simp.lisp a general mechanism for functions to map over bags has been implemented. For the function mod we get e.g. (%i7) mod(matrix([a,b],[c,d]),10); (%o7) matrix([mod(a,10),mod(b,10)],[mod(c,10),mod(d,10)]) (%i8) mod([[a,b],[c,d]],10); (%o8) [[mod(a,10),mod(b,10)],[mod(c,10),mod(d,10)]] (%i9) mod([a,b,c,d],10); (%o9) [mod(a,10),mod(b,10),mod(c,10),mod(d,10)] (%i10) mod(a=b,10); (%o10) mod(a,10) = mod(b,10) Closing this bug report as fixed. Dieter Kaiser  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1551310&group_id=4933 