f# - How can I constrain a function to not accept partially applied functions -
i have serialization function feed data into, times miss argument data generating function, , result serialize partially applied function. json.net not throw this, provides nice empty object {}
i constraint serialization function not accept partially applied arguments:
let myserializer<'a when : 'a isnotafunction> (data:'a) : string = jsonconvert.serializeobject(data)
so far have had no luck in finding way of doing this.
Comments
Post a Comment