@@ -71,7 +71,7 @@ class any {
7171 using vector = std::vector<any>;
7272 using fn = std::function<any(const any&)>;
7373 using eff_fn = std::function<any()>;
74− using thunk = std::function<const any& (const as_thunk)>;
74+ using thunk = auto (*)(const as_thunk) -> const any&;
7575
7676 template <typename T>
7777 using shared = std::shared_ptr<T>;
@@ -92,7 +92,7 @@ class any {
9292 mutable shared<vector> v;
9393 mutable shared<fn> f;
9494 mutable shared<eff_fn> e;
95− mutable shared<thunk> t;
95+ mutable thunk t;
9696 mutable shared<void> p;
9797 };
9898
@@ -126,8 +126,8 @@ class any {
126126 : type(Type::EffFunction), e(make_shared<eff_fn>(val)) {}
127127
128128 template <typename T>
129− any(const T& val, typename std::enable_if<std::is_assignable<thunk,T>::value>::type* = 0)
130− : type(Type::Thunk), t(make_shared<thunk>(val)) {}
129+ any(const T& val, typename std::enable_if<std::is_convertible<T,thunk>::value>::type* = 0)
130+ : type(Type::Thunk), t(val) {}
131131
132132 template <typename T>
133133 any(const T& val, typename std::enable_if<std::is_assignable<shared<void>,T>::value>::type* = 0)