Tree traversal: Difference between revisions

Content deleted Content added
m →‎{{header|REBOL}}: renamed second and third with left and right
Hout (talk | contribs)
Line 5,332:
 
{{Trans|Python}}
<langsyntaxhighlight lang=haskell>import Data.Tree (Tree (..), drawForest, drawTree, foldTree)
 
---------------------- TREE TRAVERSAL --------------------
Line 5,424:
justifyLeft, justifyRight :: Int -> Char -> String -> String
justifyLeft n c s = take n (s <> replicate n c)
justifyRight n c = (drop . length) <*> (replicate n c <>)</langsyntaxhighlight>
<pre>1
|