Replies: 2 comments 1 reply
-
|
I had another go I think there's a repeated pattern of performing some side effecting code with an arbitrary generated from a previous value. It would be really helpful to have something like And maybe I think that |
Beta Was this translation helpful? Give feedback.
-
|
Hello, In the case of recursive structure, I'd go for Otherwise, you can try Or |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm having some trouble building structures inside FC.
I have a Graph type with some methods (e.g. addNode(label), addEdge(from, to)) and I'm trying to build structures with a set of properties (like being forests of n-trees).
In fast check arbitrary code, this isn't 'hard' exactly, but the output is not particularly readable, as there's a lot of chaining and mapping.
I'd love to do something more monadic, unwrapping as I go, but the nesting gets very deep.
Am I missing some APIs for this in fastcheck?
Something like
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAMwMaKhEcDkCCGBnGAWiQAsBTJAa0wG4AoOpAG3zzgHEocwS4BvOnDgA7CABMyeAFxwCUYMIDmAbQC6cALxw19IWTGLJM5XIWKANLJjylqtZu2r6guEgjC5AVyQxoACigyHDF3JgBPOGAxGVMlS0Dg0IjhHBAyGOszAEp+AF8GIRAcSjIAOXEyPyiMm0UcgSEhGBJgPAA6UQl2sE88EiqxLN04fMLisgBRA0qENBAASWirWstfRZrs-hcmlvb9Q27e-uVZ9EXViEXVIZd8-LoYMLAyOAB5MBhgdzYtBrgQBTlLoAfhkwk8IAARmQoMMigAPIGSUEiCHQ2EuAHCKYHFHgqEwuE4eE45FgtGEuj3BCeYQ+L7COCKLg8AYbOIiVLpZZmSwQD4M6RvAXfBx8XL1FyBGCeKCMxBINpuDwwHDCGADLIuNpFMADTQAPhEZAA7hwWf0opYUmkslqhEqSDgFH5mYaFW1acAAI6eMgAQSgXDCfm2Htiij8WXMYb4WIAMmQlM0ZPzPt8dYCKnhLAjE8mSKmRR4dcSkXgJWHS3qbZJ3X9Gpy0u1dX5a+7maWSki21y7cNG9LZYzmQORnaq6RncJXVB3chPcIfX7A8HQ42hAuvb6A0GcCGw42FwoYGRDFA-HGFFIAAy54lSTudSRtJhJxTNOCEOAARgllivYR8w-Qs4AAJnveFgJTcD-0PRo+H+BRoNAtNBUzbFphzf5iRQot0xLBFSWwtxwBwLhfCgGQ-BwSxIRyDQjRwZQb3UDQtEhFj1AAMm4uBmJ-NiOOUQT4KESsN0aas-H2OtGK2STG1kltuBk6YOygLtJmmWcOmzZRZK41RLCffTDME64bkUxohzlJkMWsiUbnuZUCCZBwFzwVIwDfWduH6TAWkwSxAuAYK8n7RhvggN9XwgSM6hoIA
Thanks in advance :)
Beta Was this translation helpful? Give feedback.
All reactions