Package kiss.lang

Examples of kiss.lang.KFn


  }

  @Override
  public boolean checkInstance(Object o) {
    if (o instanceof KFn) {
      KFn fn=(KFn)o;
      if (!returnType.contains(fn.getReturnType())) return false; // covariance on return type
      for (int i=0; i<arity; i++) {
        if (!fn.getParamType(i).contains(paramTypes[i])) return false; // contravariance on parameter type       
      }
      return true;
    } else if (o instanceof IFn) {
      // we can't assume anything about an arbitrary IFn.....
       return true;
View Full Code Here


    for (ISeq s= bindings.seq(); s!=null; s=s.next()) {
      Entry<?, ?> me=(Entry<?, ?>)s.first();
      e=e.assoc(me.getKey(),me.getValue());
    }
   
    KFn fn=LambdaFn.create(e,body,syms);
    return d.withResult(fn);
  }
View Full Code Here

TOP

Related Classes of kiss.lang.KFn

Copyright © 2018 www.massapicom. 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.