fabiommendes/elm-climbing-grades/2.1.0

NOTE: the latest version is 2.1.1

Grades.Bouldering

Bouldering grades representation and conversion

Reference

Conversions are based on the table

Types

type Grade

Represents a bouldering grade

type System
= VGrade
| Fontainbleau

A bouldering grade system

Parsing and rendering

show : Grade -> String

Render grade as a string

showAs : System -> Grade -> String

Render grade using some grading system

parse : String -> Maybe Grade

Parse grade string

parseAs : System -> String -> Maybe Grade

Parse grade string using Hueco V-grade system

Transforms

Remove modifiers (soft, hard, etc) from grade

withMod : Mod -> Grade -> Grade

Set modifiers (soft, hard, etc)

Convert grade to the given system

Ordering and comparisons

Smallest possible grade

compare : Grade -> Grade -> Order

Compare two grades and return an ordering relation

toLinearScale : Grade -> Float

Convert grade to numeric value for easy comparison

Construct grade from numeric value