code: public static <T> Function0<T> memoizeSupplier(final Supplier<T> s) {
          AtomicReference value = new AtomicReference<>(
              UNSET);
          return ()->{
              Object val = value.get();
          if (val == UNSET) {
              synchronized (UNSET){
                  if(value.get()==UNSET) {
                      val = s.get();
                      value.set(val);
                  }
              }
          }
  
          return (T)val;
          };
  
      }
docs: Convert a Supplier into one that caches it's result
  
  @param s Supplier to memoise
  @return Memoised Supplier