Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define meta and replace. #972

Open
wants to merge 1 commit into
base: 2.0-beatmode-retired
Choose a base branch
from

Commits on Nov 27, 2022

  1. Define meta and replace.

      +meta :: forall a b.
      +        Pattern (Pattern a -> Pattern b) -> Pattern a -> Pattern b
    
      +replace :: forall a b. Ord a =>
      +           [(a,b)] -> Pattern a -> Pattern b
    
    Here's a minimal example using both.
    
      This plays the pattern "ho*8"
      at normal speed for the first half,
      and at double speed for the second half.
    
      let slang = [ (0, id)
                   , (1, fast 2) ]
         in p 1 $ meta (replace slang "0 1") "ho*8"
    JeffreyBenjaminBrown committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    8b1fabc View commit details
    Browse the repository at this point in the history