Skip to main content
Glama

mcp-appstore

by appreply-co
unfold.js1.21 kB
var _curry2 = require('./internal/_curry2'); /** * Builds a list from a seed value. Accepts an iterator function, which returns * either false to stop iteration or an array of length 2 containing the value * to add to the resulting list and the seed to be used in the next call to the * iterator function. * * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig (a -> [b]) -> * -> [b] * @param {Function} fn The iterator function. receives one argument, `seed`, and returns * either false to quit iteration or an array of length two to proceed. The element * at index 0 of this array will be added to the resulting array, and the element * at index 1 will be passed to the next call to `fn`. * @param {*} seed The seed value. * @return {Array} The final list. * @example * * var f = n => n > 50 ? false : [-n, n + 10]; * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] */ module.exports = _curry2(function unfold(fn, seed) { var pair = fn(seed); var result = []; while (pair && pair.length) { result[result.length] = pair[0]; pair = fn(pair[1]); } return result; });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server