Talk:String prepend: Difference between revisions

From Rosetta Code
Content added Content deleted
(Remarked problem with current Haskell example.)
 
(Yep.)
 
Line 1: Line 1:
==Haskell: No variable?==
I'm afraid the current Haskell example (`putStrLn ("Hello" ++ "World")`) misses the point: it shows how to append one string onto another and print the result, not how to assign a variable and update it by prepending a string.
I'm afraid the current Haskell example (`putStrLn ("Hello" ++ "World")`) misses the point: it shows how to append one string onto another and print the result, not how to assign a variable and update it by prepending a string.
: You are right! I guess functional languages don't go much for mutable state, but that is what the task requires...
:--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:54, 13 February 2015 (UTC)

Latest revision as of 08:54, 13 February 2015

Haskell: No variable?

I'm afraid the current Haskell example (`putStrLn ("Hello" ++ "World")`) misses the point: it shows how to append one string onto another and print the result, not how to assign a variable and update it by prepending a string.

You are right! I guess functional languages don't go much for mutable state, but that is what the task requires...
--Paddy3118 (talk) 08:54, 13 February 2015 (UTC)