このページによると:
http://tutor.rascal-mpl.org/Rascalopedia/List/List.html
リストでコンスを使用する方法は次のとおりです。
cons(1,[2,3]); //should return [1,2,3]
Rascal コンソールでこれを試す:
import List;
cons(1,[2,3]);
このエラーが表示されます:
|stdin:///|(1,13,<1,1>,<1,14>): The called signature: cons(int, list[int]),
does not match any of the declared (overloaded) signature patterns:
Symbol = cons(Symbol,str,list[Symbol])
Production = cons(Symbol,list[Symbol],set[Attr])
Symbol = cons(Symbol,str,list[Symbol])
Production = cons(Symbol,list[Symbol],set[Attr])
標準のインポートされた関数およびデータ型との名前の衝突はありますか?