Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リストの最初と最後の要素を取り除くのに役立つ小さな関数を書いています。これは私がやろうとしていることです:
>firstLast::[a]->[a] >firstLast [x] = [ ] >firstLast h:t = [i|i!= head[a] || i!= last[a]]
ご覧のとおり、ここではリスト内包表記を使用しようとしていますが、適切に使用していなかったようです。