[fpc-pascal] How can I implement "thrice" in Free Pascal?
andrew.pennebaker at gmail.com
Tue Oct 18 05:09:37 CEST 2011
Can this be done with arrays? I didn't mean to be too specific; I'd be happy
with any generic collection that could do this.
On Mon, Oct 17, 2011 at 6:08 PM, Marco van de Voort <marcov at stack.nl> wrote:
> 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
> > 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.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal