public static <V> Supplier<V> lazyValue(Supplier<V> provider) {
    return new Supplier<>() {
      private Object[] computed;

      @Override
      public V get() {
        //noinspection unchecked
        return computed == null? (V)(computed = new Object[] {provider.get()})[0] : (V)computed[0];
      }
    };
  }
public static <V> Supplier<V> lazyValue(Supplier<V> provider)