Esempio n. 1
0
        private static Result Tail(Evaluator.Args args)
        {
            var numElements = (int)args.GetNumSwitch("n", 10);
            var flattened   = args.Flatten().ToList();

            return(flattened.Skip(flattened.Count - numElements).ToArray());
        }
Esempio n. 2
0
        private static Result Head(Evaluator.Args args)
        {
            var numElements = (int)args.GetNumSwitch("n", 10);

            return(args.Flatten().Take(numElements).ToArray());
        }