Kernighans large earthquake problem: Difference between revisions

Content added Content deleted
No edit summary
(Added Arturo implementation)
Line 468: Line 468:
8/27/1883 Krakatoa 8.8
8/27/1883 Krakatoa 8.8
</pre>
</pre>

=={{header|Arturo}}==

<lang rebol>data: {
3/13/2009 CostaRica 5.1
8/27/1883 Krakatoa 8.8
5/18/1980 MountStHelens 7.6
}

define :earthquake [date place magnitude][
init: -> this\magnitude: round.to:1 to :floating this\magnitude
]

print first sort.descending.by:'magnitude map split.lines data =>
[to :earthquake split.words &]</lang>

{{out}}

<pre>[date:8/27/1883 place:Krakatoa magnitude:8.8]</pre>


=={{header|AWK}}==
=={{header|AWK}}==