<commit_before>//
//  JNLoanCalculator.swift
//  JNFinanceCalculator
//
//  Created by <NAME> on 21/01/2017.
//  Copyright (c) 2017 <NAME>. All rights reserved.
//

import Foundation

public class JNLoanCalculator {

    var loanAmount: Double = 0.0
    var apr: Double = 0.0
    var loanTerm: Int = 0 // in Months

    var monthlyRepayment: Double?
    var totalInterest: Double?
    var totalRepayment: Double?


    func calculate() {
        assert(Double(loanAmount) > 0.0, "Loan amount has to be greater than 0.00")
        assert(Int(loanTerm) > 0, "Loan term has to be greater than 0 months")


    }
}<commit_msg>Working out monthly rate<commit_after>//
//  JNLoanCalculator.swift
//  JNFinanceCalculator
//
//  Created by <NAME> on 21/01/2017.
//  Copyright (c) 2017 <NAME>. All rights reserved.
//

import Foundation

public class JNLoanCalculator {

    var loanAmount: Double = 0.0
    var apr: Double = 0.0
    var loanTerm: Int = 0 // in months

    var monthlyRepayment: Double?
    var totalInterest: Double?
    var totalRepayment: Double?


    func calculate() {
        assert(Double(loanAmount) > 0.0, "Loan amount has to be greater than 0.00")
        assert(Int(loanTerm) > 0, "Loan term has to be greater than 0 months")

        var dcmMonthlyRepayment, dcmTotalInterest, dcmTotalRepayment: NSDecimalNumber

        let monthlyRate: Double = workoutMonthlyRate(interest: apr)

    }

    func workoutMonthlyRate(interest: Double) -> Double {

    }

}
{'fraction_non_alphanumeric': 0.1035883547731889, 'fraction_numerical': 0.03249830737982397, 'mean_word_length': 2.838961038961039, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2018608', 'n_tokens_mistral': 538, 'n_tokens_neox': 472, 'n_words': 149}