Mercurial > hg > ishara
view sequences/seqbase.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 3f77126f7b5f |
children |
line wrap: on
line source
% seqbase - Base class for sequences % % seqbase :: % Size:[[1,D]], ~ size of item type, % (seq(A) -> A). % (seq(A) -> seq(A) | empty), % (seq(A) -> string) % -> seq([Size->_]) ~'sequence of things of size Size'. classdef seqbase < seq properties (GetAccess=private, SetAccess=immutable) sz headfn nextfn stringfn end methods function o=seqbase(size,headfn,nextfn,stringfn) o.sz =size; o.headfn=headfn; o.nextfn=nextfn; o.stringfn=stringfn; end function x=head(a), x=a.headfn(a); end function b=next(a), b=a.nextfn(a); end function s=tostring(d), s=d.stringfn(d); end function s=elsize(a), s=sz; end end end