This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The question is how to encode the mutual nested recursion happening in "razor" using structured recursion (ideally recursive coalgebras) | |
| \begin{code} | |
| open import Level using (Level;_⊔_;0ℓ) | |
| open import Relation.Nullary | |
| open import Relation.Binary.PropositionalEquality.Core | |
| module Razor where | |
| open import Data.Nat | |
| open import Data.Product | |
| open import Function.Base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module GenerateYourNeighbors | |
| open FsCheck | |
| type BST<'a> = | |
| | Empty | |
| | Node of BST<'a> * 'a * BST<'a> | |
| [<StructuralEquality;StructuralComparison>] | |
| type Extended<'a when 'a: comparison> = | |
| | NegInfty |