Skip to content

Commit

Permalink
getting started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mailund committed Mar 29, 2018
1 parent ea8683b commit 6617d2d
Show file tree
Hide file tree
Showing 82 changed files with 12,029 additions and 15 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ Type: Package
Package: pmatch
Title: Pattern Matching
Version: 0.1.3.9000
Author: Thomas Mailund <mailund@birc.au.dk>
Maintainer: Thomas Mailund <mailund@birc.au.dk>
Authors@R: person("Thomas", "Mailund",
email = "mailund@birc.au.dk",
role = c("aut", "cre"))
Description: Implements type constructions and pattern matching.
Using this package, you can specify a type of object and write functions
that matches against the structure of objects of such types to program
Expand Down Expand Up @@ -36,3 +37,4 @@ Suggests:
tailr (>= 0.1.0)
URL: https://github.com/mailund/pmatch
BugReports: https://github.com/mailund/pmatch/issues
VignetteBuilder: knitr
4 changes: 1 addition & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ suppressPackageStartupMessages(library(pmatch, quietly = TRUE))
```

# pmatch -- A package for Haskell-like pattern matching in R
# pmatch -- Haskell-like pattern matching in R

[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![lifecycle](http://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![Project Status: Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-green.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.3.9000-green.svg?style=flat-square)](commits/master)

[![Travis-CI Build Status](http://travis-ci.org/mailund/pmatch.svg?branch=master)](https://travis-ci.org/mailund/pmatch)
[![AppVeyor Build Status](http://ci.appveyor.com/api/projects/status/wvyqe7bfp4a2rm77?svg=true)](https://ci.appveyor.com/project/mailund/pmatch)
[![Coverage Status](http://img.shields.io/codecov/c/github/mailund/pmatch/master.svg)](https://codecov.io/github/mailund/pmatch?branch=master)
[![Coverage Status](http://coveralls.io/repos/github/mailund/pmatch/badge.svg?branch=master)](https://coveralls.io/github/mailund/pmatch?branch=master)

[![CRAN status](http://www.r-pkg.org/badges/version/pmatch)](https://cran.r-project.org/package=pmatch)
[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/pmatch)](https://cran.r-project.org/package=pmatch)
[![minimal R version](https://img.shields.io/badge/R-%E2%89%A53.2-blue.svg)](https://cran.r-project.org/)
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# pmatch – A package for Haskell-like pattern matching in R
# pmatch – Haskell-like pattern matching in R

[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![lifecycle](http://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![Project Status:
Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Last-changedate](https://img.shields.io/badge/last%20change-2018--03--22-green.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.3-green.svg?style=flat-square)](commits/master)

[![Last-changedate](https://img.shields.io/badge/last%20change-2018--03--29-green.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.1.3.9000-green.svg?style=flat-square)](commits/master)
[![Travis-CI Build
Status](http://travis-ci.org/mailund/pmatch.svg?branch=master)](https://travis-ci.org/mailund/pmatch)
[![AppVeyor Build
Expand All @@ -18,7 +17,6 @@ Status](http://ci.appveyor.com/api/projects/status/wvyqe7bfp4a2rm77?svg=true)](h
Status](http://img.shields.io/codecov/c/github/mailund/pmatch/master.svg)](https://codecov.io/github/mailund/pmatch?branch=master)
[![Coverage
Status](http://coveralls.io/repos/github/mailund/pmatch/badge.svg?branch=master)](https://coveralls.io/github/mailund/pmatch?branch=master)

[![CRAN
status](http://www.r-pkg.org/badges/version/pmatch)](https://cran.r-project.org/package=pmatch)
[![CRAN
Expand Down Expand Up @@ -298,7 +296,7 @@ compiler::cmpfun(other_is_leaf)
#> L(x) ~ TRUE,
#> otherwise ~ FALSE)
#> }
#> <bytecode: 0x7fcbb2c4cc98>
#> <bytecode: 0x7fbdbf487fc0>
```

The `pmatch` package makes no distinction betwen the `~` or the `->`
Expand Down Expand Up @@ -340,10 +338,10 @@ microbenchmark::microbenchmark(
is_leaf(L(1)), is_leaf_tr(L(1)), is_leaf_tr_bc(L(1))
)
#> Unit: microseconds
#> expr min lq mean median uq max
#> is_leaf(L(1)) 466.990 506.0890 739.9398 560.3095 860.519 2572.300
#> is_leaf_tr(L(1)) 329.298 367.6575 542.0151 424.9680 615.043 4348.246
#> is_leaf_tr_bc(L(1)) 328.325 375.8775 547.6445 430.3445 613.340 2568.045
#> expr min lq mean median uq max
#> is_leaf(L(1)) 415.099 433.782 588.6610 445.5965 615.8335 2220.003
#> is_leaf_tr(L(1)) 292.867 318.504 500.7040 349.0280 566.0935 3950.902
#> is_leaf_tr_bc(L(1)) 295.288 319.347 436.5413 357.8870 549.1735 1113.331
#> neval
#> 100
#> 100
Expand Down
50 changes: 50 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
template:
params:
bootswatch: cosmo

navbar:
title: "pmatch"

left:
- icon: fa-home
href: index.html
- text: "Getting Started"
href: articles/getting-started-with-pmatch-.html
- text: "Tutorials"
menu:
- text: "Getting Started"
href: articles/getting-started-with-pmatch-.html
- text: "Functions"
href: reference/index.html
- text: "Changelog"
href: news/index.html

right:
- icon: fa-twitter
href: https://twitter.com/ThomasMailund
- icon: fa-github
href: https://github.com/mailund/pmatch

reference:
- title: Defining new types
desc: >
Functions for defining new types and the constructors that go with them.
contents:
- :=

- title: Pattern matching
desc: >
Functions for matching constructed values against patterns.
contents:
- bind
- cases
- cases_expr
- cases_expr_
- test_pattern
- test_pattern_

- title: Function rewriting
desc: >
Functionality for rewriting functions that use pattern matching.
contents:
- transform_cases_function
146 changes: 146 additions & 0 deletions docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6617d2d

Please sign in to comment.