Spyke

Posts

discuss·Thoughtful DiscussionbyLinuxer

What if banks could protect your money against inflation – a proposal

Hey I am the creator of this proposal! I was just wondering about What if banks could protect your money against inflation. Feedback & more importantly criticism is vital for such project.

Disclosure : I have no banking & legal experience than some of what I learnt in 9th and 10th class and this is just a proposal to see how practical it is. Please don't discount it because of this fact and atleast still read it and please give me constructive criticism !

What if banks could protect your money against inflation – a proposalhttps://gist.github.com/SerJaimeLannister/c3db4eb84da96decfc4a62af9b7e856bOpen linkView original on discuss.online

javascript/array-manipulation/remove-duplicates.md


title: Remove Duplicates description: Removes duplicate values from an array. author: dostonnabotov tags: array,deduplicate

const removeDuplicates = (arr) => [...new Set(arr)];

// Usage:
const numbers = [1, 2, 2, 3, 4, 4, 5];
removeDuplicates(numbers); // Returns: [1, 2, 3, 4, 5]
javascript/array-manipulation/remove-duplicates.mdhttps://github.com/dostonnabotov/quicksnip/blob/main/snippets/javascript/array-manipulation/remove-duplicates.mdOpen linkView original on discuss.online

javascript/array-manipulation/partition-array.md


title: Partition Array description: Splits an array into two arrays based on a callback function. author: Swaraj-Singh-30 tags: array,partition,reduce

const partition = (arr, callback) =>
  arr.reduce(
    ([pass, fail], elem) => (callback(elem) ? [[...pass, elem], fail] : [pass, [...fail, elem]]),
    [[], []]
  );

// Usage:
const numbers = [1, 2, 3, 4, 5, 6];
const isEven = (n) => n % 2 === 0;
partition(numbers, isEven); // Returns: [[2, 4, 6], [1, 3, 5]]
javascript/array-manipulation/partition-array.mdhttps://github.com/dostonnabotov/quicksnip/blob/main/snippets/javascript/array-manipulation/partition-array.md?plain=1Open linkView original on discuss.online

You reached the end