問題タブ [clean-language]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
functional-programming - N-Queens サンプル プログラムの異常な出力
例のコードを試しますsqueen.icl
。で試してみるとBoardSize :== 11
、問題ありません。しかし、それを に変更すると12
、出力は[
. なんで?それを修正する方法は?
functional-programming - stdin から読み取るには?
クリーンでこれを行う方法は?
擬似コード:
実際、私はいくつかのpdfをちらっと見ました。でも、想像してみると、 stdin と stdout を扱うのは難しい。stdio を使用するコード例を教えてください。
キーランの指示に従って、私は小さなプログラムを完成させました。
functional-programming - Clean language: read the content of text file to list of lines. Is it possible to avoid Uniqueness?
Assuming I have *File
that I want to read its whole content, and store each line as different element in a list.
My intuitive solution was:
Both freadline
and fend
come from StdFile
module:
But ofcourse I got error since I violated some Uniquness rules:
file demanded attribute cannot be offerd by shared object.
How to avoid this Uniquness problem?
I've tried using where
to store the value of one freadline
, but apparently it doesn't work.
Please consider the fact that I'm new to Clean
and the rules of Uniqueness are not very clear to me. Thanks a lot!