-module(tastoids@from). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -define(FILEPATH, "src/tastoids/from.gleam"). -export([like/1, dislike/1, meh/1, saw/2, pass/1]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC( " Helpful shorthands for quickly making a Tastoid from\n" " a like, dislike, 'meh' or pass (zero-ish Tastoid)\n" ). -file("src/tastoids/from.gleam", 9). ?DOC(" Coerce any `index` into a simple `Tastoid` with a positive sentiment\n"). -spec like(EMV) -> tastoids@tastoid:tastoid(EMV). like(Index) -> tastoids@tastoid:from_impression(Index, yum). -file("src/tastoids/from.gleam", 14). ?DOC(" Coerce any `index` into a simple `Tastoid` with a negative sentiment\n"). -spec dislike(EMX) -> tastoids@tastoid:tastoid(EMX). dislike(Index) -> tastoids@tastoid:from_impression(Index, yuck). -file("src/tastoids/from.gleam", 19). ?DOC(" Coerce any `index` into a simple `Tastoid` with a weak negative sentiment.\n"). -spec meh(EMZ) -> tastoids@tastoid:tastoid(EMZ). meh(Index) -> tastoids@tastoid:from_impression(Index, meh). -file("src/tastoids/from.gleam", 25). ?DOC( " Coerce any `index` into a simple `Tastoid` with a specific worth\n" " (weight coefficient/multiplier for `this`'s value)\n" ). -spec saw(ENB, float()) -> tastoids@tastoid:tastoid(ENB). saw(Index, Weight) -> tastoids@tastoid:from_impression(Index, {saw, Weight}). -file("src/tastoids/from.gleam", 31). ?DOC( " Coerce any `index` into a simple `Tastoid` with no sentiment or\n" " contribution (the empty tastoid/`Insipoid`)\n" ). -spec pass(END) -> tastoids@tastoid:tastoid(END). pass(Index) -> tastoids@tastoid:from_impression(Index, pass).