code: public static <T> Predicate<T> memoizePredicate(final Predicate<T> p, final Cacheable<Boolean> cache) {
          final Function<T, Boolean> memoised = memoizeFunction((Function<T, Boolean>) t -> p.test(t), cache);
          LazyImmutable<Boolean> nullR = LazyImmutable.def();
          return (t) -> t==null? nullR.computeIfAbsent(()->p.test(null)) : memoised.apply(t);
      }
docs: Convert a Predicate into one that caches it's result
  
  @param p Predicate to memoise
  @param cache Cachable to store the results
  @return Memoised Predicate