[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Kernel documentation
From: |
daly |
Subject: |
Re: [Axiom-developer] Kernel documentation |
Date: |
Thu, 20 Oct 2011 12:09:52 -0400 |
Excellent.
I would comment that Axiom now supports "examples" of functions.
You add examples to documentation using ++X lines. For example,
pop_! : % -> S
++ pop the first element off the array stack
++ It destructively modifies its argument
++
++X a:ArrayStack INT:= arrayStack [1,2,3,4,5]
++X pop! a
++X a
The ++X comments are printed when someone displays the operation:
)d op pop!
There are 4 exposed functions called pop! :
[1] ArrayStack D1 -> D1 from ArrayStack D1 if D1 has SETCAT
[2] Dequeue D1 -> D1 from Dequeue D1 if D1 has SETCAT
[3] D -> D1 from D if D has SKAGG D1 and D1 has TYPE
[4] Stack D1 -> D1 from Stack D1 if D1 has SETCAT
Examples of pop! from ArrayStack
a:ArrayStack INT:= arrayStack [1,2,3,4,5]
pop! a
a
Examples of pop! from Dequeue
a:Dequeue INT:= dequeue [1,2,3,4,5]
pop! a
a
Examples of pop! from StackAggregate
a:Stack INT:= stack [1,2,3,4,5]
pop! a
a
Examples of pop! from Stack
a:Stack INT:= stack [1,2,3,4,5]
pop! a
a
On Thu, 2011-10-20 at 16:53 +0100, Martin Baker wrote:
> Frustrated at the minimal documentation for the Kernel domain I have
> attempted
> to start documenting it myself here:
>
> https://github.com/martinbaker/fricas/blob/master/src/algebra/kl.spad.pamphlet
>
> I have added lines: 216:272
>
> I don't consider myself an expert on this subject but perhaps its better than
> just the minimal inline comments. If so, you would be welcome to include it
> in
> Axiom/FriCAS/OpenAxiom, please also feel free to correct and extend it.
>
> Martin
>
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/axiom-developer