functional languages option topic question (1 Viewer)

Stuzul

New Member
Joined
Mar 10, 2012
Messages
23
Gender
Male
HSC
2014
Hey guys, im swondering if anyone could explain this o me. dont have a textbook on me so i cant look it up

ok, i get whats going on in cbn, its pretty obvious, buy whats the go with lfind and rfind? and are there any more that i need to know?

Any help would be greatly appreciate

cheers

A functional language supports the following data structures:
[ Nick , Ally ]
[ 1 , 2 , 37 ]
[ 7 , 9 , XY , talk ]
The language includes three built-in functions:
CBN, LFIND and RFIND
Examples of manipulations using these functions are shown below:
CBN ( [ 6 , 8 ] , [ 7 , BJ , PING ] ) = [ 6 , 8 , 7 , BJ , PING ]
LFIND ( 3 , [ 4 , 5 , 11 , 27 , 67 , 17 ] ) = 11
RFIND ( 2 , [ 4 , 5 , 11 , 27 , FISH , 17 ] ) = FISH
(i) Evaluate, showing all working:
RFIND ( 4 , CBN ( [ 3 , 9 , 2 , AARON ] , [ AS ] ))
(ii) Evaluate, showing all working:
RFIND ( LFIND ( 3 , [ 45 , 6 , 2 , TOM ] ) , [ PINK , BLUE , RED , GREEN ] )
 
Last edited:

jackss

New Member
Joined
Oct 4, 2012
Messages
10
Gender
Undisclosed
HSC
2012
bro, im pretty sure functional was removed, there was a syllabus change :/
 

Stuzul

New Member
Joined
Mar 10, 2012
Messages
23
Gender
Male
HSC
2014
mother of god, ok cheers. knew it wasnt in there interms of features but wasnt sure about examples. my teacher taught it to me like 2nd last week of school. idiot

any way thanks a heap :)
 

Stuzul

New Member
Joined
Mar 10, 2012
Messages
23
Gender
Male
HSC
2014
aw dude, excellent, cheers. wish i knew this existed before
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top