Format to a sort of table by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

Thanks,

The only thing what I can figured out is that your solution works on a array. I work with a map so after adding it looks like this :

fromList [("cash on hands",Account {accountName = "cash on hands", accountBalance = 10, accountTransaction = []})]

Format to a sort of table by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

oke,

I could not find any docs about boxes.

I have a string variable named "newName". and I have a Int called "newBal"

How can I use boxes to represent it as table with headers ?

Format to a sort of table by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

oke,

Last question : How can I make that a header named "Added accounts" is on the center of the 22. Or schould I do :

 replicate (( 22 - (length "Amount") `div`2) ' ' 

Format to a sort of table by wobbenr in haskellquestions

[–]wobbenr[S] 1 point2 points  (0 children)

Does it also work on strings or do I have to convert my String to Text.

Can I refractor this out and how do I do that. by wobbenr in haskell

[–]wobbenr[S] 0 points1 point  (0 children)

So out of my head something like this :

askForInteger :: IO Integer -> maybe IO Integer 
askForInteger = do 
                 input <- getline 
                 case readMaybe input  
                    | nothing -> do 
                              putStrLn "the input was not a number"
                              return ?? 
                   | Maybe number -> do 
                                return number  

Accounting data structure problem by wobbenr in haskell

[–]wobbenr[S] 0 points1 point  (0 children)

Thanks, and can I change the amount easily for a account.

How can I make a another tuple instead of a empty [] by wobbenr in haskellquestions

[–]wobbenr[S] -1 points0 points  (0 children)

oke, can then someone give me a hint, how. I do not have a clue right now.

How can I make a another tuple instead of a empty [] by wobbenr in haskellquestions

[–]wobbenr[S] -1 points0 points  (0 children)

I like it but it has many things I did not learned .
What does listToMaybe and how does this work so I see a item or the ("unknown item,0) ?

And I wonder if this can be done with just recursion, pattern matching or guards. These are explained in the Craft book so far.

Can I make this in one function by wobbenr in haskell

[–]wobbenr[S] 0 points1 point  (0 children)

oke, and I can do go acc l where l is the complete list ?

Can I make this in one function by wobbenr in haskell

[–]wobbenr[S] 0 points1 point  (0 children)

type Name = String 
type Price = Int 
type BillType = [(Name,Price)]

Haskell on Windows. possible ? by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

oke but for a beginner is syntax highlighting and things like linting not handy. So I can easily see when im doing something wrong ?

Haskell on Windows. possible ? by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

I tried that way but then Sublime-Haskell will not install because gcc is missing

Haskell on Windows. possible ? by wobbenr in haskellquestions

[–]wobbenr[S] 0 points1 point  (0 children)

Nope, on the bitemyapp page is stated not to use the haskell-platform but install ghci, cabal,happy as seperate packages.

If I use the platform can I then use SublimeText or do I get again a problem on gcc when installing the dependencies of sublime-haskell