Re: [F-Script-talk] array transformation
Brought to you by:
pmougin
From: Philippe M. <pm...@ac...> - 2004-09-16 09:28:42
|
Le 10 sept. 04, =E0 03:49, Jonathan 'Wolf' Rentzsch a =E9crit : > 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 :=3D {'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] Hi Jonathan, What you are looking for is: NSDate dateWithNaturalLanguageString:@a Best, Philippe Mougin= |