package traits
Common traits for generic functionality
Install
Dune Dependency
Authors
Maintainers
Sources
traits-0.1.0.tbz
sha256=c51504fe40fc7458c5aa36d1e6b2551b01cdd45389d1d67868c63dc602c440ba
sha512=0878aa46a403824eb480a65d8d37cd61a541170503fcb9d04db1f31b54ef7eba236231fde559ce21d2e0757d08b2700757c2f60486f5461c19aa3fa3001bd5ec
README.md.html
Traits
This package provides simple building blocks for generic functionality in OCaml using modules and functors.
Motivation
This package was originally developed to avoid coupling of operation (such as equality or ordering comparison) with the type information. Consider this:
Int.equal 1 2
The fact that we call [Int.equal] carries both the operation ([equal]) and the type ([int]). The original purpose has been stated to de-couple these into separate things:
Eq.eq (module Int) 1 2
It is, however, planned to extend this package to provide more common abstractions.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>