How to split strings in Haskell?

I made a program in which they enter a 1000-digit number. It is fixed, so I paste this input into the code file itself. I would obviously save it as an Integer type, but how to do it?

I tried the program with 1000 digits in one line. I know this is the worst code format! But it works.

How to assign a variable to this number and split its strings. Have I read something about eos somewhere? Ruby, the end of what?

I thought that something like comments could be used here.

Help will be appreciated.

The basic idea is to make this work:

a=3847981438917489137897491412341234
983745893289572395725258923745897232

instead of the following:

a=3847981438917489137897491412341234983745893289572395725258923745897232
+5
source share
1 answer

Haskell ( String) . String , shoehorn , String:

v = read
    "32456\
    \23857\
    \23545" :: Integer

, :

v = read . concat $
    ["32456"
    ,"24357"
    ,"23476"
    ] :: Integer

, , , ( ) , , (, read).

+12

All Articles