[F-Script-talk] array transformation
Brought to you by:
pmougin
From: Jonathan 'W. R. <ni...@re...> - 2004-09-10 01:48:25
|
Greetings all, I have an array of strings representing dates. I'd list to transform it into an array of NSDates. I currently have: > a := {'7/26/04 7:35:00 PM', '7/27/04 11:33:00 AM'} > [:e|NSDate dateWithNaturalLanguageString:e] value:@a This works, but is there a way to express this as a message send? Something like: a [:e|NSDate dateWithNaturalLanguageString:e] Failing really elegant syntax, about about something Smalltalkish like: a do:[:e|NSDate dateWithNaturalLanguageString:e] | Jonathan 'Wolf' Rentzsch http://rentzsch.com | Red Shed Software http://redshed.net | "better" necessarily means "different" |