last

Help Contents logo Mutators last
first item

logo.last :x {:#1}


Definition:

to logo.last :x {:#1}
	if set? :x
	[ 
		if local? "#1
		[ 
			if :#1<0 [error "'Invalid second argument of "Last"']
			make "#1 (count :x) - :#1
			while :#1 > 0
			[ 
				delete word "x.# setmin :x
				make "#1 :#1 - 1 
			]
			output :x
		]
		[ 
			output :(word "x.# setmax :x) 
		]
	]
	[ 
		output dll.logo.logolast 
	]
end

Examples:

References:

first item