Examples of RippleValue


Examples of net.fortytwo.ripple.model.RippleValue

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue a = stack.getFirst();
        stack = stack.getRest();

        String result = StringUtils.percentEncode(mc.toString(a));
        solutions.put(
                stack.push(StringLibrary.value(result, mc, a)));
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

                    solutions.add(left);
                }

                return;
            }
            RippleValue first = left.getFirst();
            final StackMapping f = first.getMapping();

            if (null == f) {
                if (right.isNil()) {
                    //System.out.println("adding solution: " + left);
                    solutions.add(left);
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

        if (0 > n) {
            return;
        }

        stack = stack.getRest();
        final RippleValue l = stack.getFirst();
        final RippleList rest = stack.getRest();

        Sink<RippleList> listSink = new Sink<RippleList>() {
            public void put(final RippleList list) throws RippleException {
                RippleList result = take(list, n, mc.list());
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

        public void apply(final RippleList arg,
                          final Sink<RippleList> solutions,
                          final ModelConnection mc) throws RippleException {

            RippleValue b;
            RippleList stack = arg;

            b = stack.getFirst();
            stack = stack.getRest();
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {

        RippleList stack = arg;

        RippleValue l;

        final RippleValue f = stack.getFirst();
        stack = stack.getRest();
        final RippleValue v = stack.getFirst();
        stack = stack.getRest();
        l = stack.getFirst();
        final RippleList rest = stack.getRest();

        Sink<RippleList> listSink = new Sink<RippleList>() {
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

    public void apply(final RippleList arg,
                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {
        RippleList stack = arg;

        RippleValue regex, replacement, s;
        String result;

        replacement = stack.getFirst();
        stack = stack.getRest();
        regex = stack.getFirst();
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

            if (stopped) {
                return;
            }

            //System.out.println(this + " -- stack = " + stack);
            RippleValue first = arg.getFirst();
            //System.out.println( "   first.isActive() = " + first.isActive() );
            //System.out.println("   first = " + stack.getFirst());

            if (null != first.getMapping()) {
                RippleList rest = arg.getRest();
                //System.out.println("   rest = " + rest);

                final StackMapping f = first.getMapping();
                //System.out.println("   f = " + f);
                //System.out.println("   f.arity() = " + f.arity());

                // Nullary functions don't need their argument stacks reduced.
                // They shouldn't even care if the stack is empty.
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

        x = mc.toBoolean(stack.getFirst());
        stack = stack.getRest();
        y = mc.toBoolean(stack.getFirst());
        stack = stack.getRest();

        RippleValue result = mc.valueOf(x || y);

        solutions.put(
                stack.push(result));
    }
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

        max = mc.toNumericValue(stack.getFirst()).intValue();
        stack = stack.getRest();
        min = mc.toNumericValue(stack.getFirst()).intValue();
        stack = stack.getRest();
        RippleValue p = stack.getFirst();
        final RippleList rest = stack.getRest();

        Sink<Operator> opSink = new Sink<Operator>() {
            public void put(final Operator op) throws RippleException {
                solutions.put(rest.push(
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue

                x = mc.toBoolean(stack.getFirst());
                stack = stack.getRest();

                if (x) {
                    RippleValue t = mc.valueOf(true);
                    RippleValue f = mc.valueOf(false);
                    solutions.put(stack.push(t).push(t));
                    solutions.put(stack.push(t).push(f));
                    solutions.put(stack.push(f).push(t));
                } else {
                    RippleValue f = mc.valueOf(false);
                    solutions.put(stack.push(f).push(f));
                }
            }
        };
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.