<commit_before>use std::thunk::Invoke;

// Consume a closure
fn foo (f:Box<Invoke<(), int>>) {
    print!("{}", f.invoke(()) );
}

// Produce a closure
pub fn main () {    
    let f : Box<Invoke<(),int>> = box move |:()| 1 ;
    foo (f);
}<commit_msg>more typing details are explicit now<commit_after>use std::thunk::Invoke;

// Consume a closure
// Notice: Use Box<...>.
fn elim_invoke_object (f:Box<Invoke<(), int>>) {
    print!("{}", f.invoke(()) );
}

// Produce a closure
// Notice: Use Box<...> and explicit lifetime of 'x.
pub fn intro_invoke_object <'x> () -> Box<Invoke<(), int> + 'x> {
    let f : Box<Invoke<(),int>> = box move |:()| 1 ;
    f
}

#[test]
pub fn my_test () {
    let o = intro_invoke_object () ;
    elim_invoke_object( o )
}

pub fn main () {
    let o = intro_invoke_object () ;
    elim_invoke_object( o )
}
{'fraction_non_alphanumeric': 0.2061978545887962, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 3.2, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 17, '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': '2051256', 'n_tokens_mistral': 311, 'n_tokens_neox': 312, 'n_words': 86}