![]() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Dark colour scheme for MarkdownEditor (https://github.com/madskristensen/MarkdownEditor) | |
* | |
* Licensed under MIT license. | |
* | |
* Copyright (c) 2018 James Cheese | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
addTo = (x) => (y) => x + y, | |
//make a closure with scope x=5 | |
addToFive = addTo(5), | |
//becomes addTo(5) => (y) => 5 + y | |
eight = addToFive(3) | |
in //becomes addTo(5) => (3) => 5 + 3 | |
eight |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
Table.CreateAmortization = let | |
AmortizationFunction = (initialAmount as number, interestRate as number, numberOfPeriods as number, periodicity as text, optional date as any, optional balloonPayment as number) as table => | |
let | |
CompoundingPeriods = {"Daily", "Monthly", "Quarterly", "Semi-annual", "Annual"}, | |
CompoundingMap = {{"Daily",365}, {"Monthly",12}, {"Quarterly",4}, {"Semi-annual",2}, {"Annual",1}}, | |
CompoundingPeriod = List.First(List.Select(CompoundingMap, each _{0} = periodicity)){1}, | |
Balloon = if balloonPayment is null then 0 else balloonPayment, | |
PeriodicInterest = interestRate / CompoundingPeriod, | |
TotalPeriods = numberOfPeriods * CompoundingPeriod, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let func = | |
let | |
ListDateImpl = | |
(From as date, To as date, Selection as text ) => | |
let | |
// Create default-value "Day" if no selection for the 3rd parameter has been made | |
TimeInterval = if Selection = null then "Day" else Selection, |