Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update readme
  • Loading branch information
loganhenson committed Oct 24, 2019
commit a4e36b6488a40751047d3c28f5a015a3ccd9a8f5
18 changes: 3 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
![Vector Core](./logo.png)

[![Build Status](https://travis-ci.org/joseph-walker/vector.svg?branch=master)](https://travis-ci.org/joseph-walker/vector)
[![Coverage Status](https://coveralls.io/repos/github/joseph-walker/vector/badge.svg?branch=master)](https://coveralls.io/github/joseph-walker/vector?branch=master)
[![Badge Status](https://img.shields.io/badge/badge%20status-dank-brightgreen.svg)](https://niceme.me/)

[Read the Docs](http://joseph-walker.github.io/vector/)

## The Elevator Pitch
Vector gives your functions superpowers.
It lets you autoload your functions with Composer without having to mess with autoloading individual files.
Expand All @@ -14,7 +10,7 @@ It provides built-in memoization for abstracting away time-consuming pure operat
It gives you useful helpers for composing simple functions into more complex ones and gives you the building blocks you need to make data manipulation easier than ever, all while maintaining a simple and declarative module loading system so your dependencies are always clear and concise.

## PHP Version Support
- 7.0 +
- 7.4 +

## Install
```
Expand Down Expand Up @@ -49,15 +45,7 @@ $addSix(4); // 10;
Pattern Matching? Of course. (For Maybe/Either see vector/functors)
```
Pattern::match([
function (Just $value) {
return function (string $unwrapped) {
return $unwrapped;
};
},
function (Nothing $_) {
return function () {
return 'nothing';
};
},
fn(Just $value) => fn(string $unwrapped) => $unwrapped,
fn(Nothing $value) => fn() => 'nothing',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to change the syntax without the extra layer of lambda / fat arrow? Like:

fn(Just $value) => $value,
fn(Nothing $_) => 'nothing',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so like auto extract?

])(Maybe::just('just')); // 'just'
```