'From VisualWorks® NonCommercial, Release 5i.4 of August 9, 2001 on June 12, 2002 at 4:19:34 pm'! !CormasNS.Kernel.CormasModel methodsFor: 'entites'! create: n groups: classGroup from: aCollec | collection groupSize index newGroup groupsCollec | groupsCollec := OrderedCollection new. collection := Cormas mixt: aCollec. groupSize := (aCollec size / n) asInteger. index := 1. 1 to: n - 1 do: [:i | newGroup := classGroup new init. index to: groupSize * i do: [:j | newGroup addComponent: (collection at: j)]. groupsCollec add: newGroup. index := groupSize * i + 1]. newGroup := classGroup new init. index to: collection size do: [:j | newGroup addComponent: (collection at: j)]. groupsCollec add: newGroup. ^groupsCollec! !