A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gasche/random-generator below:

gasche/random-generator: A small OCaml library to randomly generate values

random-generator 0.1

random-generator is trying to answer the following question:

What is an elegant interface for random value generation?

The focus is to get a combinator library where small, composable combinators are composed to express rich behaviors. I tried hard to choose type definitions that avoid duplication of concerns between the various aspects of the library, building domain-specific notions of random generation on top of a simple base layer in a modular way.

(Note that this focus is sometimes in tension with providing convenient, derived functions that make user's code short and easy to read. For now, random-generator will choose the "nice for the library designer" way, and code may require some time learning the library to be easy to read. You have been warned.)

The library currently provides three different pieces:

I consider the value of this library to be in its interface, not necessarily its implementation. I think the current interface is solid (though it can still be improved) and encourage people writing random generators to steal and reuse it -- or at least feel inspired by it.

I consider that I can (and will) break backward compatibility by changing the interface for any 0.x release.

This library is free software, available under the BSD-2-clause license (see file LICENSE).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4