in reply to Re^2: ordering array of sentences
in thread ordering array of sentences
As usual in functional programming, read from right to left (or bottom to top):
The map changes the sentences to arrays of arrays. Each such an array has two elements: the word to sort on and the original sentence.
sort just sorts the arrays according to their first element, i.e. the sort word.
map transforms the arrays back to sentences.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: ordering array of sentences
by welle (Beadle) on Nov 13, 2012 at 17:51 UTC | |
Re^4: ordering array of sentences
by welle (Beadle) on Nov 13, 2012 at 19:24 UTC | |
by afoken (Chancellor) on Nov 14, 2012 at 06:18 UTC |
In Section
Seekers of Perl Wisdom