Repository: JasonShin/functional-programming-jargon.rs Branch: master Commit: d020d6d607d5 Files: 64 Total size: 90.9 KB Directory structure: gitextract_jfkkq38d/ ├── .github/ │ └── workflows/ │ └── rust.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE ├── README.md ├── fp-core/ │ ├── Cargo.toml │ └── src/ │ ├── applicative.rs │ ├── apply.rs │ ├── chain.rs │ ├── comonad.rs │ ├── compose.rs │ ├── empty.rs │ ├── extend.rs │ ├── extract.rs │ ├── foldable.rs │ ├── functor.rs │ ├── hkt.rs │ ├── identity.rs │ ├── lens.rs │ ├── lib.rs │ ├── monad.rs │ ├── monoid.rs │ ├── pure.rs │ ├── semigroup.rs │ └── setoid.rs ├── fp-examples/ │ ├── Cargo.toml │ └── src/ │ ├── adt_example.rs │ ├── anamorphism_example.rs │ ├── applicative_example.rs │ ├── arity_example.rs │ ├── catamorphism_example.rs │ ├── closure_example.rs │ ├── comonad_example.rs │ ├── continuation_example.rs │ ├── contracts_example.rs │ ├── currying_example.rs │ ├── empty_example.rs │ ├── endomorphism_example.rs │ ├── foldable_example.rs │ ├── function_composition_example.rs │ ├── functor_example.rs │ ├── hof_example.rs │ ├── homomorphism_example.rs │ ├── idempotent_example.rs │ ├── isomorphism_example.rs │ ├── lambda_example.rs │ ├── lens_example.rs │ ├── main.rs │ ├── monad_example.rs │ ├── monoid_example.rs │ ├── option_example.rs │ ├── partial_application_example.rs │ ├── pointed_functor_example.rs │ ├── predicate_example.rs │ ├── purity_example.rs │ ├── referential_transparency_example.rs │ ├── semigroup_example.rs │ ├── setoid_example.rs │ ├── side_effects_example.rs │ ├── type_signature_example.rs │ └── value.rs └── rust-toolchain.toml ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/rust.yml ================================================ name: CI on: push: branches: [master] pull_request: branches: [master] env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always jobs: fmt: name: Format Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - name: Check formatting run: cargo fmt --all -- --check clippy: name: Clippy (Lint) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: clippy - name: Run clippy run: cargo clippy --all-targets --all-features -- -D warnings # -D warnings makes lint warnings fail CI (fixes Issue #34) test: name: Test Suite runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Run tests run: cargo test --all-features --workspace - name: Run doc tests run: cargo test --doc --workspace ================================================ FILE: .gitignore ================================================ /target **/*.rs.bk ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Citizen Code of Conduct ## 1. Purpose A primary goal of PureRust is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. We invite all those who participate in PureRust to help us create safe and positive experiences for everyone. ## 2. Open [Source/Culture/Tech] Citizenship A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. ## 3. Expected Behavior The following behaviors are expected and requested of all community members: * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. * Exercise consideration and respect in your speech and actions. * Attempt collaboration before conflict. * Refrain from demeaning, discriminatory, or harassing behavior and speech. * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. ## 4. Unacceptable Behavior The following behaviors are considered harassment and are unacceptable within our community: * Violence, threats of violence or violent language directed against another person. * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. * Posting or displaying sexually explicit or violent material. * Posting or threatening to post other people's personally identifying information ("doxing"). * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. * Inappropriate photography or recording. * Inappropriate physical contact. You should have someone's consent before touching them. * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. * Deliberate intimidation, stalking or following (online or in person). * Advocating for, or encouraging, any of the above behavior. * Sustained disruption of community events, including talks and presentations. ## 5. Weapons Policy No weapons will be allowed at PureRust events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter. ## 6. Consequences of Unacceptable Behavior Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. Anyone asked to stop unacceptable behavior is expected to comply immediately. If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event). ## 7. Reporting Guidelines If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. visualbbasic@gmail.com. Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. ## 8. Addressing Grievances If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Jason Shin with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. ## 9. Scope We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business. This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members. ## 10. Contact info visualbbasic@gmail.com ## 11. License and attribution The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). _Revision 2.3. Posted 6 March 2017._ _Revision 2.2. Posted 4 February 2016._ _Revision 2.1. Posted 23 June 2014._ _Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._ ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to functional-programming-jargon.rs All sort of contributions are welcome and there are no complicated rules with it. We appreciate: - New features - Bug fixes - Suggestions - Ideas ## Issues Feel free to submit issues, ideas, suggestions and enhancement requests. ## Contributing Please refer to each project's style guidelines and guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow. 1. **Fork** the repo on GitHub 2. **Clone** the project to your own machine 3. **Commit** changes to your own branch 4. **Push** your work back up to your fork 5. Submit a **Pull request** so that we can review your changes NOTE: Be sure to merge the latest from "upstream" before making a pull request! ## Development Environments | type | version | | ---- | ---------------------- | | OS | Linux, Windows and Mac | You will need to install Rust to work on this project. Installation instruction can be found at https://www.rust-lang.org/tools/install. ### Requirements - **Rust stable** (1.70.0 or later recommended) - **No nightly features required** - this project uses only stable Rust features The project automatically uses the correct Rust version via `rust-toolchain.toml`. ### Running Tests ```bash # Run all tests cargo test --workspace # Run tests for a specific package cargo test -p fp-core # Run with output cargo test -- --nocapture ``` ### Code Quality Checks ```bash # Format code cargo fmt --all # Check formatting cargo fmt --all -- --check # Run clippy lints cargo clippy --all-targets --all-features # Fix clippy warnings automatically (where possible) cargo clippy --all-targets --all-features --fix ``` ## Copyright and Licensing is an open source project licensed under the MIT license. functional-programming-jargon.rs does not require you to assign the copyright of your contributions, you retain the copyright. functional-programming-jargon.rs does require that you make your contributions available under the MIT license in order to be included in the main repo. If appropriate, include the MIT license summary at the top of each file along with the copyright info. If you are adding a new file that you wrote, include your name in the copyright notice in the license summary at the top of the file. ## License Summary You can copy and paste the MIT license summary from below. ``` MIT License Copyright (c) 2026 Jason Shin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ``` ================================================ FILE: Cargo.toml ================================================ [workspace] members = [ "fp-examples", "fp-core" ] ================================================ FILE: LICENSE ================================================ Copyright (c) 2026 Jason Shin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
