<?php
function fn_appendn_c($aql)
{
	$list = $aql->Consume(1);
	
	$consumation = $list[0]->value;
	
	$reallist = $aql->Consume($consumation);
		
	$apool = array();
	for($x=0;$x<count($reallist);$x++)
	{
		$q = $consumation - $x;
		foreach($reallist[$q]->value as $v)
		{
			if (!in_array($v,$apool))
			{
				$apool[] = $v;
			}
		}
	}
	
	$a = new AQLStackElement();
	$a->typename = $reallist[0]->typename;
	$a->islist = true;
	$a->value = $apool;
	array_push($aql->stack,$a);
	
	return;
}
?>