--- On Mon, 4/12/10, keith <[email protected]> wrote:

> From: keith <[email protected]>
> Subject: Re: [Newbies] Re: How to sort a SortedCollection like you can sort a 
> table in Excel?
> To: "A friendly place to get answers to even the most basic questions about 
> Squeak." <[email protected]>
> Date: Monday, April 12, 2010, 4:53 PM
> I add a <= to
> 
> then you can write:
> 
>  [ :a :b | { a width. a depth. } <= { b width. b depth }
> ]
> 
> regards
> 
> Keith

For the win!

Cool, Keith.

It's easy to forget how smart collection are.

Cheers, --Jer


> 
> 
> On 12 Apr 2010, at 17:52, Andreas Raab wrote:
> 
> > On 4/12/2010 7:48 AM, Bert Freudenberg wrote:
> >> Hmm, indenting it like this makes it more
> obvious:
> >>
> >>     a height>  b height or:
> [
> >>     a height = b height and: [
> >>         a
> width>  b width or: [
> >>         a width = b
> width and: [
> >>        
>     a depth>  b depth]]]]
> >
> > Personally, I write multi-level sort blocks like
> here:
> >
> >     a height = b height
> >         ifTrue:[a width
> = b width
> >        
>     ifTrue:[a depth >= b depth]]
> >        
>     ifFalse:[a width >= b width]
> >         ifFalse:[a
> height >= b height]
> >
> > Cheers,
> >  - Andreas
> > _______________________________________________
> > Beginners mailing list
> > [email protected]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
> 



_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to