1

In http://codeworld.info/, you can only draw/print/display data in types of Text and Number (and you need Show to convert Number to Text). So what can I do to let codeworld draw something that is neither a Text or Number?

luqui
  • 59,485
  • 12
  • 145
  • 204
Alic
  • 638
  • 6
  • 27

1 Answers1

4

Chris recently added the ability to import the Haskell base library into CodeWorld, so you can do this:

import Prelude hiding (show)
import HaskellPrelude (show)

showT(x) = fromString(show(x))

main = pictureOf(text(showT([1,2,3,4,5])))
luqui
  • 59,485
  • 12
  • 145
  • 204