User Tools

Site Tools


hourlist

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
hourlist [2009/08/04 00:31] 64.122.198.69hourlist [2009/08/04 22:50] 64.122.198.69
Line 1: Line 1:
 3-Aug-2009  3-Aug-2009 
  
-Don Park 3:15pm feeling tricky by listing all hours in a day with this ruby: +Don Park 2:45pm feeling tricky by listing all hours in a day with this ruby: 
 <code ruby> <code ruby>
 irb(main):001:0> ["am","pm"].map{|m| (["12"]+1.upto(11).to_a).map{|h| "#{h} #{m}"}}.flatten irb(main):001:0> ["am","pm"].map{|m| (["12"]+1.upto(11).to_a).map{|h| "#{h} #{m}"}}.flatten
Line 26: Line 26:
 </code> </code>
  
-@skaldef 4:26pm: @selenamarie @donpdonp @robotadam Haskell: +@kscaldef 4:26pm: @selenamarie @donpdonp @robotadam Haskell: 
 <code haskell> <code haskell>
 Prelude> [ show h ++ " " ++ m | m<- ["am", "pm"], h <- [12] ++ [1..11]] Prelude> [ show h ++ " " ++ m | m<- ["am", "pm"], h <- [12] ++ [1..11]]
hourlist.txt · Last modified: 2024/01/31 04:08 by 127.0.0.1