Objectmix
Tags Register Mark Forums Read

SML Help : ml

This is a discussion on SML Help within the ml forums in Programming Languages category; Hello, Can anyone help me on that... plsss I have to make a list.. composelist: (Žab -> Žab)list -> Žab -> Žab, such that if [f1, ..., fn] is a list of suncions of type Žab -> Žab and x is a value of type Žab, then the call composelist [f1, ..., fn] x will return the value vf1(f2(... fn-1(fn(x)))). In the case where n = 0 (the list of dunction is empty) composelist [] x should return x. composelist [fn y => Y*Y, fn z => z+1, fn w => div 2] 4 should return the value 9 (= ...


Object Mix > Programming Languages > ml > SML Help

Reply

 

LinkBack Thread Tools
  #1  
Old 10-27-2008, 08:43 AM
Junior Member
 
Join Date: Oct 2008
Posts: 0
shazilatif is on a distinguished road
Default SML Help

Hello,

Can anyone help me on that... plsss I have to make a list..

composelist: (Žab -> Žab)list -> Žab -> Žab, such that if
[f1, ..., fn] is a list of suncions of type Žab -> Žab and x is a value of type Žab, then the call composelist [f1, ..., fn] x will return the value vf1(f2(... fn-1(fn(x)))).
In the case where n = 0 (the list of dunction is empty) composelist [] x should return x.

composelist [fn y => Y*Y, fn z => z+1, fn w => div 2] 4

should return the value 9 (= ((4div2)+1)* ((4div2)+1)).

Thanks in advance...
Reply

Thread Tools



All times are GMT -5. The time now is 12:50 AM.

Managed by Infnx Pvt Ltd.