DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
karthicktamil17 profile image
karthick rajan • Edited

Purescript

flremove val =
let
value = toCharArray val
value1 = Array.length value
in
if (length val > 2)
then do
show $ fromCharArray $ Array.slice 1 (value1 -1) value
else ""

main = render =<< withConsole do
log $ flremove "string"

Forem Open with the Forem app