How can I write this generic function with a arrow function ?
function simpleState<T>(initial: T): [() => T, (v: T) => void] { let value: T = initial; return [ () => value, (v: T) => { value = v; } ]};
How can I write this generic function with a arrow function ?
function simpleState<T>(initial: T): [() => T, (v: T) => void] { let value: T = initial; return [ () => value, (v: T) => { value = v; } ]};