login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

(1) -> <spad>
)abbrev category MYLIST MyListPackage
MyListPackage(T: Type): with
    length2: List T -> Integer
  == add
    len(count: Integer, l: List T): Integer ==
        empty? l => count
        len(count + 1, rest l)
length2(l: List T): Integer == len(0, l)</spad>
Compiling FriCAS source code from file 
      using old system compiler.
   MYLIST abbreviates category MyListPackage 
   initializing NRLIB MYLIST for MyListPackage 
   compiling into NRLIB MYLIST 
   compiling local len : (Integer,List T$) -> Integer
Time: 0.00 SEC.
compiling exported length2 : List T$ -> Integer Time: 0.00 SEC.
(time taken in buildFunctor: 0)
;;; *** |MyListPackage| REDEFINED
;;; *** |MyListPackage| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor MyListPackage Time: 0.01 seconds
finalizing NRLIB MYLIST Processing MyListPackage for Browser database: --->-->MyListPackage(constructor): Not documented!!!! --->-->MyListPackage((length2 ((Integer) (List T$)))): Not documented!!!! --->-->MyListPackage(): Missing Description ; compiling file "/var/aw/var/LatexWiki/MYLIST.NRLIB/MYLIST.lsp" (written 08 DEC 2023 01:58:31 PM):
; wrote /var/aw/var/LatexWiki/MYLIST.NRLIB/MYLIST.fasl ; compilation finished in 0:00:00.016 ------------------------------------------------------------------------ MyListPackage is now explicitly exposed in frame initial MyListPackage will be automatically loaded when needed from /var/aw/var/LatexWiki/MYLIST.NRLIB/MYLIST

length2 [1,2,3]

Type: PositiveInteger?
length2 ["a", "b", "c", "d"]

Type: PositiveInteger?

  Subject:   Be Bold !!
  ( 14 subscribers )  
Please rate this page: