{"id":17156661,"url":"https://github.com/manuels/matlab-scoreunder","last_synced_at":"2026-02-12T23:33:48.169Z","repository":{"id":10530549,"uuid":"12723297","full_name":"manuels/matlab-scoreunder","owner":"manuels","description":"underscore/scoreunder for matlab","archived":false,"fork":false,"pushed_at":"2013-09-10T08:28:46.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-12T06:49:30.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manuels.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-10T07:39:31.000Z","updated_at":"2013-09-10T08:28:47.000Z","dependencies_parsed_at":"2022-08-30T19:11:28.159Z","dependency_job_id":null,"html_url":"https://github.com/manuels/matlab-scoreunder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manuels/matlab-scoreunder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuels%2Fmatlab-scoreunder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuels%2Fmatlab-scoreunder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuels%2Fmatlab-scoreunder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuels%2Fmatlab-scoreunder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manuels","download_url":"https://codeload.github.com/manuels/matlab-scoreunder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuels%2Fmatlab-scoreunder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29386222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T22:07:52.078Z","status":"ssl_error","status_checked_at":"2026-02-12T22:07:49.026Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T22:07:02.243Z","updated_at":"2026-02-12T23:33:48.152Z","avatar_url":"https://github.com/manuels.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"matlab-scoreunder\n=================\n\nThis library is for everyone who hates matlab just as deeply as I do. It brings some functions for functional programming from [underscore](http://underscorejs.org/)/[lowdash](http://lodash.com/)/[scoreunder](https://github.com/loop-recur/scoreunder) to matlab.\nNote that its paragon is scoreunder that means that it aims to support lowdash functions (where it makes sense) but the arguments of all functions are reversed!\n\nGetting Started\n===============\nAfter downloading/cloning the library and adding it to the search path of matlab (using `addpath`) you can use scoreunder like this\n\n    \u003e\u003e u = scoreunder();\n    \u003e\u003e square = @(x) x*x;\n    \u003e\u003e u.map2matrix(square, 1:5)\n    [1, 4, 9, 16, 25]\n\n\nAuto-Curried Functions\n======================\nUnderscore's functions are auto-curried where it makes sense. See [Brian Lonsdorf's presentation](https://www.youtube.com/watch?v=m3svKOdZijA) to understand why.\nThat means that arguments are curried (bound) to functions if you call the function with less arguments than it needs to evaluate:\n\n    \u003e\u003e square = @(x) x*x;\n    \u003e\u003e squareElements = u.map2matrix(square);\n    \u003e\u003e squareElements(1:5)\n    [1, 4, 9, 16, 25]\n    \n    \u003e\u003e add = @(x,y) x+y;\n    \u003e\u003e squareSum = u.compose(u.reduce(add, 0), squareElements)\n    55\n\nMap/Reduce\n==========\n`map2xxx(fn, collection)` and `reduce(fn, init, collection)` are agnostict with respect to the type of their collection argument but map is not with respect to its output type:\n\n    \u003e\u003e square = @(x) x*x;\n    \u003e\u003e map2matrix(square, [1,2,3])\n    [1, 4, 9]\n    \u003e\u003e map2matrix(square, {1,2,3})\n    [1, 4, 9]\n    \u003e\u003e map2cell(square, [1,2,3])\n    {1, 4, 9}\n    \u003e\u003e map2cell(square, {1,2,3})\n    {1, 4, 9}\n    \n    \u003e\u003e add = @(x,y) x+y;\n    \u003e\u003e mysum = u.reduce(add, 0, 1:3);\n    6\n\nMore functions\n==============\nFor more functions supported by scoreunder and how to use them checkout the [`test.m`](https://github.com/manuels/matlab-scoreunder/blob/master/test.m) file\n\n    fieldnames(scoreunder())\n        'autoCurry'\n        'curry'\n        'compose'\n        'identity'\n        'isMatrix'\n        'isArray'\n        'isCell'\n        'isTrue'\n        'isFalse'\n        'map2cell'\n        'map2matrix'\n        'map2array'\n        'reduce'\n        'filter'\n        'ifThenElse'\n        'first'\n        'rest'\n        'zip'\n        'flatten'\n\nHelp Developing\n===============\nI'm more than welcome for pull requests. However, note that every new feature must include tests in [`test.m`](https://github.com/manuels/matlab-scoreunder/blob/master/test.m) that check and describe them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuels%2Fmatlab-scoreunder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanuels%2Fmatlab-scoreunder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuels%2Fmatlab-scoreunder/lists"}