This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set variable | |
_pkgbase=mpv-full-git | |
_pkgbase_cache_dir="$HOME/.cache/yay" | |
_repo_cache_dir="$HOME/Applications/git" | |
_git_url=https://github.com/mpv-player/mpv.git | |
_git_repo="${_git_url%%.git}" | |
_git_repo="${_git_repo##*.com/}" | |
# prepare source code | |
[ -d "${_pkgbase_cache_dir}" ] || mkdir -p "${_pkgbase_cache_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Takes a predicate and a list of values and returns a a tuple (2-item array), | |
* with each item containing the subset of the list that matches the predicate | |
* and the complement of the predicate respectively | |
* | |
* @sig (T -> Boolean, T[]) -> [T[], T[]] | |
* | |
* @param {Function} predicate A predicate to determine which side the element belongs to. | |
* @param {Array} arr The list to partition | |
* |