[Haskell-cafe] what does ' mean?
jcast at ou.edu
Sun Jul 17 15:42:19 EDT 2005
Logesh Pillay <logesh at iafrica.com> wrote:
> Dear list
> A v. newbie question.
> I found the following code on the web
> /-- Andrew Bromage
> /-- If you're doing permutations, then I suppose you want this too:
> //-- (subLists might be a more suggestive name)
> /combinations *:: [a] -> [[a]]
> *combinations  = []
> combinations (x:xs)
> = combinations xs ++ [ x:xs' | xs' <- combinations xs ]
> What does ' (apostrophe) mean? I see no reference to it in Simon
> Thompson's book.
In Haskell, ' following a letter or number in a variable name is
considered a part of the variable name. So, xs' is just a variable name
distinct from xs.
More information about the Haskell-Cafe