[fpc-pascal] How can I implement "thrice" in Free Pascal?

Marco van de Voort marcov at stack.nl
Tue Oct 18 00:08:40 CEST 2011

In our previous episode, Andrew Pennebaker said:
> thrice :: a -> [a]
> thrice x = [x, x, x]
> I know the answer involves generics, but the docs don't offer examples using
> Free Pascal's built-in generic types.

There is no built in list type, generic or not, and no way to define new
operators.  All list and collection types are library.  I see no way this
could work.

More information about the fpc-pascal mailing list