clean-language

Split string to a list of strings in Clean

北城以北 提交于 2019-12-11 02:57:49
问题 Because of the limited amount of resources, I need to propose a question here . I have been struggling with functional programming, the endless Haskell tutorials don't really help me. So what I want to achieve, in Clean language, is to split a string like " car cow cat " to a list of strings ["car","cow","cat"] . Can you provide me a detailed answer (does not have to be complete code), on how to iterate through this string, and especially the part when the newly constructed strings are added

How can a time function exist in functional programming?

跟風遠走 提交于 2019-11-28 14:54:57
I've to admit that I don't know much about functional programming. I read about it from here and there, and so came to know that in functional programming, a function returns the same output, for same input, no matter how many times the function is called. It's exactly like a mathematical function which evaluates to the same output for the same value of the input parameters which involves in the function expression. For example, consider this: f(x,y) = x*x + y; // It is a mathematical function No matter how many times you use f(10,4) , its value will always be 104 . As such, wherever you've

How can a time function exist in functional programming?

浪尽此生 提交于 2019-11-27 19:40:53
问题 I've to admit that I don't know much about functional programming. I read about it from here and there, and so came to know that in functional programming, a function returns the same output, for same input, no matter how many times the function is called. It's exactly like a mathematical function which evaluates to the same output for the same value of the input parameters which involves in the function expression. For example, consider this: f(x,y) = x*x + y; // It is a mathematical