Logo GenPRES

HeightValue Module

Creates a height in meter or in cm, converts a height to cm, formats a height and returns the normal height of an age type.

Nested modules

Modules Description

Dto

Holds the Dto of a height value and converts a height value to and from the Dto. Returns a validation error for a height outside the bounds.

Validation

Holds the validators of a height in meter and in cm, which accept a height from 0.2 meter to 3 meter.

Functions and values

Function or value Description

avgAdolescent

Full Usage: avgAdolescent

Returns: HeightValue
Returns: HeightValue

avgAdult

Full Usage: avgAdult

Returns: HeightValue
Returns: HeightValue

avgChild

Full Usage: avgChild

Returns: HeightValue
Returns: HeightValue

avgInfant

Full Usage: avgInfant

Returns: HeightValue
Returns: HeightValue

avgNewBorn

Full Usage: avgNewBorn

Returns: HeightValue
Returns: HeightValue

avgToddler

Full Usage: avgToddler

Returns: HeightValue
Returns: HeightValue

fromAgeType gend

Full Usage: fromAgeType gend

Parameters:
Returns: AgeType -> HeightValue option
gend : Gender
Returns: AgeType -> HeightValue option

getHeightCm

Full Usage: getHeightCm

Returns: HeightValue -> decimal<MeasureProduct<cm, MeasureOne>>

getValue _arg1

Full Usage: getValue _arg1

Parameters:
Returns: bool * decimal
_arg1 : HeightValue
Returns: bool * decimal

heightInCm x

Full Usage: heightInCm x

Parameters:
    x : decimal

Returns: HeightValue
x : decimal
Returns: HeightValue

heightInMeter x

Full Usage: heightInMeter x

Parameters:
    x : decimal

Returns: HeightValue
x : decimal
Returns: HeightValue

map fM fCm _arg1

Full Usage: map fM fCm _arg1

Parameters:
Returns: 'a
Type parameters: 'a
fM : decimal<MeasureProduct<m, MeasureOne>> -> 'a
fCm : decimal<MeasureProduct<cm, MeasureOne>> -> 'a
_arg1 : HeightValue
Returns: 'a

toString fixPrec _arg1

Full Usage: toString fixPrec _arg1

Parameters:
Returns: string
fixPrec : int
_arg1 : HeightValue
Returns: string

Type something to start searching.