groupBy in OFORTH version V0.9.23

If you have found a bug and would like to report it, it's here...

groupBy in OFORTH version V0.9.23

Postby Bill » 06 Feb 2016 23:32

This used to work:

Code: Select all
>seq(9) groupBy(3) println
[stdin:1:17] ExRuntime : 3 does not understand method <#perform>


Expected output:

Code: Select all
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Bill
 
Posts: 5
Joined: 14 Sep 2015 03:38

Re: groupBy in OFORTH version V0.9.23

Postby Franck » 07 Feb 2016 01:16

Hello,

This operation has been renamed "splitBy" (I'am finishing documentation on this).

groupBy is now dedicated to group all elements according to a response to a word :

For instance :
Code: Select all
10 seq groupBy(#isEven) .
[[0, [1, 3, 5, 7, 9]], [1, [2, 4, 6, 8, 10]]]


In fact, this is what should be the result, because there is actually a bug into #groupBy.
It is resolved and correction will be included this week-end into a new release.

Thank you for reporting.

EDIT : After checking, #splitBy was introduced in V0.9.22, not V0.9.23

Franck
Franck
 
Posts: 162
Joined: 29 Oct 2014 19:01


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 2 guests

cron