Appearance
const filterBy = (key) => (value) => (item) => item[key].includes(value); const filterByTag = filterBy('tag'); const prompts = [{ title: 'AI助手', tag: 'Finance' }, { title: '翻译机', tag: 'Tool' }]; const financePrompts = prompts.filter(filterByTag('Finance'));