Re: [fricas-devel] bugs in Dequeue

2013-11-18 Thread Waldek Hebisch
Ralf Hemmecke wrote: > > On 11/18/2013 04:37 AM, Waldek Hebisch wrote: > > > Attached is a patch implementing missing functions. > > I'm not completely satisfied. The reason lies here: > > ++ A dequeue is a doubly ended stack, that is, a bag where first items > ++ inserted are the first items e

Re: [fricas-devel] bugs in Dequeue

2013-11-18 Thread Ralf Hemmecke
On 11/18/2013 04:37 AM, Waldek Hebisch wrote: > Clearly the code is messed up. There are already destructive > versions, namely 'extractTop!' and 'extractBottom!'. And there > is nondestructive 'top'. So we should remove 'top!' and > rename 'bottom!' to 'bottom'. Right. > Well, actually just r

Re: [fricas-devel] bugs in Dequeue

2013-11-17 Thread Waldek Hebisch
> > Oh... We have... > > DequeueAggregate(S : Type): > Category == Join(StackAggregate S, QueueAggregate S) with >dequeue : () -> % > ++ dequeue()$D creates an empty dequeue of type D. >dequeue : List S -> % > ++ dequeue([x, y, ..., z]) creates a dequeue with first (top or fron

Re: [fricas-devel] bugs in Dequeue

2013-11-16 Thread Ralf Hemmecke
Oh... We have... DequeueAggregate(S : Type): Category == Join(StackAggregate S, QueueAggregate S) with dequeue : () -> % ++ dequeue()$D creates an empty dequeue of type D. dequeue : List S -> % ++ dequeue([x, y, ..., z]) creates a dequeue with first (top or front) ++ element

[fricas-devel] bugs in Dequeue

2013-11-16 Thread jiazhaoconga
(1) -> a:Dequeue INT:= dequeue [1,2,3,4,5] (1) [1,2,3,4,5] Type: Dequeue(Integer) (2) -> depth a Internal Error The function depth with signature hashcode is missing from domain Dequeue(Integer) (2) -> top! a Internal Error