Playing with purescript and running into an odd problem with string concatenation. I've loaded and imported the Prelude
, Data.List
, Data.Maybe
, and Data.String
(also, tried importing Data.Array
) but the PSCi still doesn't recognize (++)
. This would suggest that either, (++)
is not contained in any of my imported modules (in which case a pointer to the appropriate module(s) to import would be appreciated), or there was some weird problem when I installed purescript and set my enviornment. I find the latter unlikely but hey I'll keep my considerations open.
Thanks in advance!
In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball".
Concatenation is the process of appending one string to the end of another string. You concatenate strings by using the + operator. For string literals and string constants, concatenation occurs at compile time; no run-time concatenation occurs. For string variables, concatenation occurs only at run time.
Concatenation is an associative operation, so that the concatenation of three or more strings, for example , , etc., is well-defined. The concatenation of two or more numbers is the number formed by concatenating their numerals. For example, the concatenation of 1, 234, and 5678 is 12345678.
Newer versions of PureScript (since 0.9 I think) have abandoned ++
in favor of <>
. That operator should work out of the box, since it is contained in purescript-prelude.
Thanks @gb. for the clarification. Edited the incorrect part of my answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With