Ret1() public static method

public static Ret1 ( ISeq ret, object nil ) : ISeq
ret ISeq
nil object
return ISeq
コード例 #1
0
ファイル: MultiFn.cs プロジェクト: redchew-fork/clojure-clr
 public override object invoke(object arg1, object arg2, object arg3, object arg4)
 {
     return(GetFn(_dispatchFn.invoke(arg1, arg2, arg3, arg4)).
            invoke(Util.Ret1(arg1, arg1 = null),
                   Util.Ret1(arg2, arg2 = null),
                   Util.Ret1(arg3, arg3 = null),
                   Util.Ret1(arg4, arg4 = null)));
 }
コード例 #2
0
 public override object invoke(object arg1, object arg2)
 {
     return((_fn2 == null)
         ? base.invoke(arg1, arg2)
         : _fn2(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null)));
 }
コード例 #3
0
ファイル: Var.cs プロジェクト: rpete4130/clojure-clr
 public object invoke(object arg1, object arg2, object arg3, object arg4)
 {
     return(GetFn().invoke(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null)));
 }
コード例 #4
0
 public override object invoke(object arg1)
 {
     if (_fn1 == null)
     {
         throw WrongArityException(1);
     }
     return(_fn1(
                Util.Ret1(arg1, arg1 = null)));
 }
コード例 #5
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4)
 {
     return((_fn4 == null)
         ? base.invoke(arg1, arg2, arg3, arg4)
         : _fn4(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null)));
 }
コード例 #6
0
 public override object invoke(object arg1, object arg2)
 {
     if (_fn2 == null)
     {
         throw WrongArityException(2);
     }
     return(_fn2(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null)));
 }
コード例 #7
0
ファイル: Var.cs プロジェクト: willemdijkgraaf/ClojureClr
 public object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)
 {
     return(GetFn().invoke(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null)));
 }
コード例 #8
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
 {
     return((_fn6 == null)
         ? base.invoke(arg1, arg2, arg3, arg4, arg5, arg6)
         : _fn6(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null)));
 }
コード例 #9
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4)
 {
     if (_fn4 == null)
     {
         throw WrongArityException(4);
     }
     return(_fn4(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null)));
 }
コード例 #10
0
ファイル: MultiFn.cs プロジェクト: rpete4130/clojure-clr
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7,
                               object arg8)
 {
     return(GetFn(_dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)).
            invoke(Util.Ret1(arg1, arg1 = null),
                   Util.Ret1(arg2, arg2 = null),
                   Util.Ret1(arg3, arg3 = null),
                   Util.Ret1(arg4, arg4 = null),
                   Util.Ret1(arg5, arg5 = null),
                   Util.Ret1(arg6, arg6 = null),
                   Util.Ret1(arg7, arg7 = null),
                   Util.Ret1(arg8, arg8 = null)));
 }
コード例 #11
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
 {
     if (_fn6 == null)
     {
         throw WrongArityException(6);
     }
     return(_fn6(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null)));
 }
コード例 #12
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)
 {
     return((_fn9 == null)
         ? base.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
         : _fn9(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null),
                Util.Ret1(arg8, arg8 = null),
                Util.Ret1(arg9, arg9 = null)));
 }
コード例 #13
0
ファイル: Var.cs プロジェクト: willemdijkgraaf/ClojureClr
 public object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7,
                      object arg8, object arg9, object arg10, object arg11, object arg12)
 {
     return(GetFn().invoke(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null),
                Util.Ret1(arg8, arg8 = null),
                Util.Ret1(arg9, arg9 = null),
                Util.Ret1(arg10, arg10 = null),
                Util.Ret1(arg11, arg11 = null),
                Util.Ret1(arg12, arg12 = null)));
 }
コード例 #14
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)
 {
     if (_fn9 == null)
     {
         throw WrongArityException(9);
     }
     return(_fn9(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null),
                Util.Ret1(arg8, arg8 = null),
                Util.Ret1(arg9, arg9 = null)));
 }
コード例 #15
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, object arg10, object arg11, object arg12, object arg13, object arg14)
 {
     return((_fn14 == null)
         ? base.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
         : _fn14(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null),
                Util.Ret1(arg8, arg8 = null),
                Util.Ret1(arg9, arg9 = null),
                Util.Ret1(arg10, arg10 = null),
                Util.Ret1(arg11, arg11 = null),
                Util.Ret1(arg12, arg12 = null),
                Util.Ret1(arg13, arg13 = null),
                Util.Ret1(arg14, arg14 = null)));
 }
コード例 #16
0
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, object arg10, object arg11, object arg12, object arg13, object arg14)
 {
     if (_fn14 == null)
     {
         throw WrongArityException(14);
     }
     return(_fn14(
                Util.Ret1(arg1, arg1 = null),
                Util.Ret1(arg2, arg2 = null),
                Util.Ret1(arg3, arg3 = null),
                Util.Ret1(arg4, arg4 = null),
                Util.Ret1(arg5, arg5 = null),
                Util.Ret1(arg6, arg6 = null),
                Util.Ret1(arg7, arg7 = null),
                Util.Ret1(arg8, arg8 = null),
                Util.Ret1(arg9, arg9 = null),
                Util.Ret1(arg10, arg10 = null),
                Util.Ret1(arg11, arg11 = null),
                Util.Ret1(arg12, arg12 = null),
                Util.Ret1(arg13, arg13 = null),
                Util.Ret1(arg14, arg14 = null)));
 }
コード例 #17
0
ファイル: MultiFn.cs プロジェクト: rpete4130/clojure-clr
 public override object invoke(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7,
                               object arg8, object arg9, object arg10, object arg11, object arg12, object arg13, object arg14,
                               object arg15)
 {
     return(GetFn(
                _dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
                                   arg15)).
            invoke(Util.Ret1(arg1, arg1 = null),
                   Util.Ret1(arg2, arg2 = null),
                   Util.Ret1(arg3, arg3 = null),
                   Util.Ret1(arg4, arg4 = null),
                   Util.Ret1(arg5, arg5 = null),
                   Util.Ret1(arg6, arg6 = null),
                   Util.Ret1(arg7, arg7 = null),
                   Util.Ret1(arg8, arg8 = null),
                   Util.Ret1(arg9, arg9 = null),
                   Util.Ret1(arg10, arg10 = null),
                   Util.Ret1(arg11, arg11 = null),
                   Util.Ret1(arg12, arg12 = null),
                   Util.Ret1(arg13, arg13 = null),
                   Util.Ret1(arg14, arg14 = null),
                   Util.Ret1(arg15, arg15 = null)));
 }
コード例 #18
0
        public static object ApplyToHelper(IFn fn, ISeq argList)
        {
            switch (RT.BoundedLength(argList, 20))
            {
            case 0:
                argList = null;
                return(fn.invoke());

            case 1:
                return(fn.invoke(Util.Ret1(argList.first(), argList = null)));

            case 2:
                return(fn.invoke(argList.first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 3:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 4:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 5:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 6:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 7:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 8:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 9:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 10:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 11:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 12:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 13:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 14:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 15:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 16:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 17:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 18:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 19:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            case 20:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , Util.Ret1((argList = argList.next()).first(), argList = null)
                                 ));

            default:
                return(fn.invoke(argList.first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , (argList = argList.next()).first()
                                 , RT.SeqToArray <object>(Util.Ret1(argList.next(), argList = null))));
            }
        }
コード例 #19
0
ファイル: MultiFn.cs プロジェクト: rpete4130/clojure-clr
 public override object invoke(object arg1)
 {
     return(GetFn(_dispatchFn.invoke(arg1)).
            invoke(Util.Ret1(arg1, arg1 = null)));
 }
コード例 #20
0
ファイル: Var.cs プロジェクト: willemdijkgraaf/ClojureClr
 public object invoke(object arg1)
 {
     return(GetFn().invoke(
                Util.Ret1(arg1, arg1 = null)));
 }
コード例 #21
0
 public virtual object applyTo(ISeq arglist)
 {
     return(ApplyToHelper(this, Util.Ret1(arglist, arglist = null)));
 }