YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
|
|
@ -4,11 +4,13 @@ floyd :: Int -> [[Int]]
|
|||
floyd n =
|
||||
snd $
|
||||
mapAccumL
|
||||
(\start row -> (start + succ row, [start .. start + row]))
|
||||
(\a x ->
|
||||
let m = a + x
|
||||
in (succ m, [a .. m]))
|
||||
1
|
||||
[0 .. pred n]
|
||||
|
||||
-- TEST -----------------------------------------------------------------------
|
||||
-- TEST -------------------------------------
|
||||
showFloyd :: [[Int]] -> String
|
||||
showFloyd xs =
|
||||
let padRight n = length >>= (<$> mappend (replicate n ' ')) . drop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue