FQL does not provide random number generation, as its operations attempt to be as deterministic as possible.
This is a strange feature to be missing from a language and I don’t see how the attempt to be deterministic is helpful.
I need to construct a UDF and connect it with a GraphQL mutation. The UDF requires multiple steps in a transaction where I need to randomly select an item in an array. I have a similar use case where I need to generate a random dice roll. This is trivial in any other language but downright impossible in FQL.
One case I can solve in my host language as the docs recommend (though it is still cumbersome to do so) but the other case is less reliable with a dynamic set of items to choose from and multiple concurrent actors adding/deleting those items.