Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat1 :: a -> [a]
- repeat1 x = xs where xs = x : xs
- acc_repeat :: Int -> a -> [a]
- acc_repeat n x = take n (repeat1 x)
- q2 :: Int -> Int -> String
- q2 m n = acc_repeat n '*'++"\n"++
- acc_repeat (1) '*'++
- acc_repeat (n-2) ' '++
- acc_repeat (1) '*'++"\n"++
- acc_repeat n '*'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement