CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-prelude-ls

A functionally oriented utility library for LiveScript with curried functions for lists, objects, strings, numbers, and function composition.

89

1.53x
Overview
Eval results
Files

task.mdevals/scenario-6/

Workshop Attendee Analytics

Utilities for cleaning, comparing, and organizing repeated workshop attendance lists.

Capabilities

Produce unique attendee roster

  • ["kim","kim","lee","kim","park"] yields ["kim","lee","park"], preserving first-seen order. @test

Shared attendees between sessions

  • ["ash","bo","cato","dee","ash"] and ["cato","ash","em"] produce ["ash","cato"], ordered by first session appearance. @test

Count attendees by team

  • Records [ {id:"a",team:"red"}, {id:"b",team:"red"}, {id:"c",team:"blue"}, {id:"d",team:"red"} ] return {red:3, blue:1}. @test

Group attendees by role

  • Records [ {id:"1",role:"mentor"}, {id:"1",role:"mentor"}, {id:"2",role:"learner"}, {id:"3",role:"learner"} ] yield {mentor:["1"], learner:["2","3"]} with role buckets preserving first-seen order per id. @test

Implementation

@generates

API

export interface Attendee {
  id: string;
  name: string;
  team: string;
  role: string;
}

export function uniqueRoster(names: string[]): string[];
export function sharedAttendees(sessionA: string[], sessionB: string[]): string[];
export function countByTeam(records: Attendee[]): Record<string, number>;
export function groupByRole(records: Attendee[]): Record<string, string[]>;

Dependencies { .dependencies }

prelude-ls { .dependency }

Functional utilities for deduplication, set-style comparisons, counting, and grouping.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-prelude-ls

tile.json