Mercurial > hg > ishara
view sched/list_schedule.m @ 44:3cedfd4549ef
Code added since initial check in.
author | samer |
---|---|
date | Tue, 13 Jan 2015 14:03:17 +0000 |
parents | f7fb679637ff |
children |
line wrap: on
line source
% list_action - Make event action from list of times and parameters % % list_action :: % timed_action({A},{}) ~'the action to perform at each time', % seq cell { % time ~'time of event', % A ~'argument to pass to action' % } ~'the list of times and parameters to action' % -> time ~'time of first event', % msched_action. function sch=list_schedule(action,X) if isempty(X), sch={}; else e0=head(X); sch={e0{1},@act}; end function [err,sch1]=act(t_sched) err=action(t_sched,e0{2}); sch1=list_schedule(action,next(X)); end end